2008年8月25日星期一

Re: [fw-mvc] How to correctly use Zend_Dojo_Data

$posts = new Albums();
$this->view->albums = $posts->fetchAll();
$row = $posts->fetchAll();
$rowArray = $row->toArray();//this works for me
$data = new Zend_Dojo_Data('id', $rowArray);
$this->view->data = $data;

notmessenger wrote:
>
> Does anyone have a working example of using Zend_Dojo_Data? I've been
> over the code in the actual component as well as everything I can find
> online, mailing list archives, etc and I clearly am not understanding how
> to use it.
>
> Trying various instantiations, I keep toggling between receiving the
> errors of "Only arrays and objects may be attached", "Item must contain a
> column matching the currently set identifier" and "Overwriting items using
> addItem() is not allowed". Clearly my understanding of how to use this
> module is not accurate.
>
> I am attempting to pass in an array, but am not certain what the structure
> of it should be.
>
> Thanks!
>
> ----
> Jeremy Brown
> Senior Web Developer
> Spear One
> 972.661.6038
> www.spearone.com<http://www.spearone.com>
>
>
>
> -----
> Jeremy Brown
> Senior Web Developer
> Spear One
> 972.661.6038
> www.spearone.com
>

--
View this message in context: http://www.nabble.com/How-to-correctly-use-Zend_Dojo_Data-tp19149257p19149874.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: