This content has been marked as final. Show 5 replies
I wonder if it is possible to use data binding and/or model in this case? These FB 2.0.1 help topics (or through LiveDocs) might be of use:
Defining bindings in ActionScript
Defining binding watchers
Binding a service result to other objects
Using RPC services
Defining a data model
Specifying an external source for an <mx:Model> tag or <mx:XML> tag
Thanks for the quick answer ;)
I'm not sure im clear on what you are suggesting so i hope you dont mind me asking: when you say defining bindings in actionscript you mean setting the httpservice url's and send() function within the click function of the refresh button?
If now i would really appriciate if you can supply more details on your suggestions.
You are not showing any code so it is hard to say what is wrong, but this should work fine.
Are you using method="POST", an resultFormat="e4x"?
Also, do NOT BIND directly to lastResult, it is too hard to debug. Instead, use a result handler function. Put a trace statement in the result handler, using toXMLString() on the event.result. Make sure you know what you are getting.
Why shuold i use method="POST", an resultFormat="e4x"?
What i wrote was:
<mx:HTTPService url=".../tableData.xml" id="taxiService" result="taxiHandler(event)"/>
then the taxiHandler function:
private var taxiArray:ArrayCollection = new ArrayCollection();
private function taxiHandler(evt:ResultEvent):void
then i added the refresh button by using <mx:button> and in its click function i tried to do taxiService.send() (to reload the httpservice) and then refresh the data array but like i said it didnt update the datagrid :(
shuold i try setting the method to POST in the 2nd time i call the taxiservice httpservice?
Thanks for your help :)
any new ideas maybe? ;c