7/28/2010 11:17:58 PM
Title:
Need Help in BlazeDS remote Object
Hi,
I need a help in Blazeds.
Here is my sample code
public function getObjective():void
{
var ro:RemoteObject= new mx.rpc.remoting.mxml.RemoteObject;
ro.destination="getEntity";
// getobjectives(); is java method which return ArryList
ro.getobjectives();
ro.addEventListener(ResultEvent.RESULT,objectivesResultHandler);
}
private function objectivesResultHandler(event:ResultEvent):ArrayCollection
{ var objectiveList:ArrayCollection= new ArrayCollection;
objectiveList=event.result as ArrayCollection;
return objectiveList;
}
My problem is i am calling getObjective() function in one `for-loop`.
I need to return result ArrayCollection from first function.
or in simple,
I need <b>single function</b> which invoke remote-object and return ResultEvent result as arrayCollection,
So that i can call this function anywhere and get the ResultEvent results.
Thanks in advance