PDA

View Full Version : ZendAMF, Custom ItemRenderer question..


hpnotiqtymes
07-25-2009, 03:14 AM
Lil background:
created a cms using flex for practice.
working on the news section editor. which has a form thats used to submit new news entries which works fine.

using a remote object to retrieve the data from the database which is put into an object in php then adds this object to an array and then returns the php array which is then used as the data provider for the list in flex.

now ived used zendAMF before and had no problem doing this before but for some reason now all its doing is allowing me to display just the 1st item in the object. if that makes any sense. the others are coming up blank however i do know its not the php because when i run the query and echo out the items in the array they echo perfect so it has something to do with flex..hopefully that makes some semblance of sense..let me know if there are any ideas..

thanks in advance..

wvxvw
07-26-2009, 01:28 PM
The code of you getting the result from RO would help a lot. Few commas in your post would also be of a great assistance ;)

hpnotiqtymes
07-26-2009, 02:45 PM
lol sorry about no punctuation.. heres the code..

private function getEntryListener ( event:ResultEvent ):void
{
//data provider for the list..
nl.dataProvider = event.result as Array;
}

this is the remote object
<mx:RemoteObject id="theNews" destination="zend" source="news" showBusyCursor="true" fault="faultListener ( event )">
<mx:method name="addEntry" result="addEntryListener ( event )"/>
<mx:method name="getEntries" result="getEntryListener ( event )"/>
</mx:RemoteObject>

its nothing different from what ive always done with zendamf and theres no need to post the php because i know thats not the problem because i echoed out the query results in a test and its pulling from the db properly..

let me know if you see something i dont..

wvxvw
07-26-2009, 02:53 PM
Try for-in and for-each in the event.result and see what it prints out. Maybe you don't serialize the data right. Or, maybe, the result is in the first array's position...

hpnotiqtymes
07-26-2009, 03:04 PM
thx ill give that a try..its just weird because i did it the exact same way on a previous project and it worked fine..newho ill give your suggestion a try and repost with the result..thx