I am developing the development on a mobile application using Flex.
I am trying to connect to HttpService using a URL that returns an XML data.
& lt; S: HttpService id = "test" url = "UrlToConnectTo" /> and in the script:
private function init (): zero {test.send (); } And the final result of the service I am bound to a list.
<: list: list = id = "list" top = " 0 "down =" 0 "left =" 0 "correct =" 0 "datataprider =" {test.lastResult.Item.FiscalYear} "labeled field =" item name "/> Are there other alternate means of handling data received by the services? I would like to inspect the data, but I'm not sure what sort of list it is (array in the list, architecture ??)
Side note: I can also get the data through JSON, but I am unable to tie the recovery data properly in the list control.
Appreciate the provided links / insights.
Are there other alternative means of handling data received by the services? Yes, use a handler, such as the theoretical form:
and your handler method:
Result on Rescue function (Event: ResultEvent): zero {event.result; // Change XML XML from XMLListCollection var to myCollection: XMLListCollection = New XMLListCollection (in the form of an .xml); // Convert the array result to ARCcollection by mycollection: ArrayCollection = New ArrayCollection (event.result as Array); } Most likely you would like to change whatever you return to make your data something more useful in Flex. XML as XML examples or arrays in Arrayculation as two examples
Comments
Post a Comment