I am trying to pass an array collection from flex page to my backend java.Here is the code,
private function getItems():void{
myObj = new Object();
myObj['dId']= dId.value.toString();
myObj['itmList']=JSON.encode(itmList);// trying to pass like this..
var url:String = URLManager.baseURL;
url = url+"myController/ReportController?do=getItems";
url = url+"¶meter="+ escape(JSON.encode(myObj))
var urlRequest:URLRequest = new URLRequest(url);
navigateToURL(urlRequest,"_blank");
}
My itmList
is an array collection, how can I pass it from JSon to Java controller? And how to get that in Java?
JSON.encode the itmList source array instead. (i.e. itmList.source
is an array)
Then use HTTPService instead: HTTPService AsyncToken and AsyncResponder example
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments