BlazeDS Developer Guide

Handling results

Most service calls return data to the application. The RemoteObject component creates an Operation object for each operation supported by the associated Java class. Access the data by using the Operation.lastResult property for the specific operation, or in a result event by using the ResultEvent.result property.

By default, the resultFormat property value of the Operation class is object, and the data that is returned is represented as a simple tree of ActionScript objects. Flex interprets XML data to appropriately represent base types, such as String, Number, Boolean, and Date. To work with strongly typed objects, populate those objects using the object tree that Flex creates.

The RemoteObject component returns anonymous Objects and Arrays that are complex types. If makeObjectsBindable is true, which it is by default, Objects are wrapped in mx.utils.ObjectProxy instances and Arrays are wrapped in mx.collections.ArrayCollection instances.

You handle results for the RemoteObject component in much the same way as you do for the WebService component. For more information, see Handling service results.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/rpc_remoteobject_7.html