Pass in parameter from ComboBox to WebService
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="10"> <mx:Script> import mx.utils.ArrayUtil; </mx:Script> <mx:WebService id="employeeWS" destination="wsDest" fault="mx.controls.Alert.show(event.fault.faultString)"> <mx:operation name="getList"> <mx:request> <deptId>{dept.selectedItem.data}</deptId> </mx:request> </mx:operation> </mx:WebService> <mx:ArrayCollection id="employeeAC" source="{ArrayUtil.toArray(employeeWS.getList.lastResult)}" /> <mx:HBox> <mx:ComboBox id="dept" width="150"> <mx:dataProvider> <mx:ArrayCollection> <mx:source> <mx:Object label="A" data="A para" /> <mx:Object label="B" data="B para" /> <mx:Object label="C" data="C para" /> </mx:source> </mx:ArrayCollection> </mx:dataProvider> </mx:ComboBox> <mx:Button label="Get" click="employeeWS.getList.send()" /> </mx:HBox> <mx:DataGrid dataProvider="{employeeAC}" width="100%"> <mx:columns> <mx:DataGridColumn dataField="name" headerText="Name" /> <mx:DataGridColumn dataField="phone" headerText="Phone" /> <mx:DataGridColumn dataField=" to email" headerText="Email" /> </mx:columns> </mx:DataGrid> </mx:Application>