Explicit parameter passing with RemoteObject and WebService components
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="10">
<mx:Script>
import mx.controls.Alert;
[Bindable]
public var empList:Object;
</mx:Script>
<mx:RemoteObject id="employeeRO" destination="EmpManager" result="empList=event.result"
fault="Alert.show(event.fault.faultString, 'Error');"/>
<mx:ComboBox id="dept" width="150">
<mx:dataProvider>
<mx:ArrayCollection>
<mx:source>
<mx:Object label="A" data="ENG"/>
<mx:Object label="B" data="PM"/>
<mx:Object label="C" data="MKT"/>
</mx:source>
</mx:ArrayCollection>
</mx:dataProvider>
</mx:ComboBox>
<mx:Button label="Get Employee List" click="employeeRO.getList(dept.selectedItem.data);" />
</mx:Application>
Related examples in the same category