我需要编写以下事件。我有一个Flex数据网格。当我单击一行时,我应该读取一个特定列并调用一个远程EJB方法.Flex EJB网桥与BlazeDs.Here完美协作是我的代码Flex DataGrid查询
<mx:DataGrid id="employees" x="100" y="50" dataProvider="{empList}" height="150" click='empHandler();'>
<mx:columns>
<mx:DataGridColumn headerText="empid" dataField="empid" />
</mx:columns>
</mx:DataGrid>
我的员工结构empid:数字,名字,姓氏,电子邮件,图像,密码都是字符串。 表包含empids.When名单我选择的特定行我打的EJB方法将返回整个员工object.I我打电话的远程方法如下
<mx:RemoteObject id="srv" showBusyCursor="true" destination="quizAppEJB"
fault="mx.controls.Alert.show(event.fault.faultString, 'Error')">
<mx:method name="checkLogin" result="empList=event.result"
fault="mx.controls.Alert.show(event.fault.faultString)">
<mx:arguments>
<username>username.text</username>
<password>password.text</password>
</mx:arguments>
</mx:method>
这是我empHandler方法。
private function empHandler():void
{
Alert.show('hi');
srv.getEmployeeDetails(empid);
}
我不知道如何设置EMPID存在于表
username.text password.text
employees.selectedItem.empid
我想将empDetailList.employee.image的值设置为image的图像。我不确定我是否清楚,但会澄清如果您有任何疑问。