This content has been marked as final. Show 4 replies
You've got it wrong:) FP implements single thread event based model. So, when you make a call to HTTPService, you should not be waiting for response at all, instead, you should supply the event listener on result & failure events. And when data will be received, the function will be called.
As Dmitri mentioned, you should listen to the result event of the HTTPService. HTTPService calls to the server are asynchronous, so HTTPService will dispatch a result event when the response from the server is received.
Please find more details on how to listen for result and fault events of the HTTPService at the URL below.
You can also have a look at concept called Binding in Flex. This will allow you to bind your DataGrid to a ArrayCollection and when the ArrayCollection is modified, your DataGrid will reflect the changes. Please find more details on Binding at the URL below.
Hope this helps.
I have been using this document you provided since I started using Flex, but I am not sure if I use something called progress bar or something would do me any good.
The code itself in the back end does not contain errors, so I think even if I use result or failure in my HTTPService code, I still get a blank grid no matter what.
I am attempting to allow users to edit the data entries after they get committed to the database, which I have to change the state for that. However, I have noticed that when I change the state to the view of which is supposed to extract the information from the database, the data itself does not seem to be committed yet. Would a progress bar help?
No, a progress bar will not help with this.
You must have a fault handler though. HTTPService will raise a fault if you do not call the back end correctly (bad url, or security problem, for example.)