Using the Event Model Remote Server Calls

When making calls via <mx:WebService> or <mx:RemoteObject>, you are calling logic that resides outside of Flex. Just like the <mx:HTTPService> tag discussed in Lesson 6, "Using Remote XML Data with Controls," you do not have control over when the server will finish executing the request you made. Therefore, you need to use events and event listeners to capture when the server is finished with the request.

There are two ways in which the client can receive data/events from the server. The first is in response to a call initiated by the client and is known as synchronous communication. In the second method (which is known as asynchronous communication and is discussed in detail in Lesson 19, "Introducing Flex Data Services"), the server pushes data down to the client because of some change in the data (DataService) or event (Publisher) on the server. For the scope of this lesson, you will focus on just calling the server and receiving events from those calls.

Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225 © 2008-2017.
If you may any questions please contact us: