Calling RemoteObject components in ActionScript : RemoteObject « Development « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Development » RemoteObjectScreenshots 
Calling RemoteObject components in ActionScript
        

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    
    import mx.controls.Alert;
    import mx.rpc.remoting.RemoteObject;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    [Bindable]
    public var empList:Object;
    public var employeeRO:RemoteObject;

    public function useRemoteObject(intArg:int, strArg:String):void
    {
      employeeRO = new RemoteObject();
      employeeRO.destination = "EmpManager";
      employeeRO.getList.addEventListener("result",getListResultHandler);
      employeeRO.addEventListener("fault", faultHandler);
      employeeRO.getList("AAA");
    }
    public function getListResultHandler(event:ResultEvent):void {
      empList = event.result;
    }
    public function faultHandler (event:FaultEvent):void {
      Alert.show(event.fault.faultString, 'Error');
    }
  </mx:Script>
</mx:Application>

   
    
    
    
    
    
    
    
  
Related examples in the same category
1.Feed returning value from RemoteObject to DataGridFeed returning value from RemoteObject to DataGrid
2.Call remote method with RemoteObjectCall remote method with RemoteObject
3.Convert returning value from RemoteObject to ArrayCollectionConvert returning value from RemoteObject to ArrayCollection
4.Pass bounded parameters to RemoteObjectPass bounded parameters to RemoteObject
5.RemoteObject Result EventRemoteObject Result Event
6.RemoteObject With BindingsRemoteObject With Bindings
7.Remote Object Explicit ArgumentsRemote Object Explicit Arguments
8.Remote Object with Multiple MethodsRemote Object with Multiple Methods
ww_w.__j_a_v___a___2s_.__c___om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.