RemoteObject Result Event : RemoteObject « Development « Flex






RemoteObject Result Event

RemoteObject Result Event
        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    
      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;
      
      [Bindable]
      private var statesData:ArrayCollection;
      private function resultHandler(event:ResultEvent):void
      {
        statesData = event.result as ArrayCollection;
      }
  
  </mx:Script>
  
  <mx:RemoteObject id="myRemoteObject" destination="helloClass" result="resultHandler(event)"/>
    
  <mx:Button label="Get Array" click="myRemoteObject.getArray()"/>
  <mx:DataGrid dataProvider="{statesData}"/>
  
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Feed returning value from RemoteObject to DataGridFeed returning value from RemoteObject to DataGrid
2.Calling RemoteObject components in ActionScript
3.Call remote method with RemoteObjectCall remote method with RemoteObject
4.Convert returning value from RemoteObject to ArrayCollectionConvert returning value from RemoteObject to ArrayCollection
5.Pass bounded parameters to RemoteObjectPass bounded parameters to RemoteObject
6.RemoteObject With BindingsRemoteObject With Bindings
7.Remote Object Explicit ArgumentsRemote Object Explicit Arguments
8.Remote Object with Multiple MethodsRemote Object with Multiple Methods