I'm having real trouble iterating through a Zend_Db_Table_Rowset object
using partialLoop.
I've got code like:
controller:
$this->view->partialLoop()->setObjectKey('model');
$this->view->someRowset=$someRowset;
view script:
<?=
$this->partialLoop('index/view-tablerow-partial.phtml',$this->someRowset);
?>
/view-tablerow-partial.phtml:
<TR>
<TD>
<?= $this->model->getCompany(); ?>
</TD>
</TR>
And I'm getting the error:
Fatal error: Call to a member function getCompany() on a non-object in
view-tablerow-partial.phtml on line 3
I've tried putting the partialLoop()->setObjectKey('model') in the view
script, using fluent interface and seperately, but nothing seems to work. A
dump() shows that $this->model is an array, not an object.
Am I doing something wrong, or is this functionality not working? The
documentation is too sparse to tell - I'll submit better documentation once
I've got it working!
Thanks,
Mark
--
View this message in context: http://www.nabble.com/partialLoop---Zend_Db_Table_Rowset-as-object-usage-tp21994862p21994862.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论