Flex关于用ArrayCollection获得数据库传过来的数据
高手帮忙看一下我这样写为什么获取不到数据<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="white" width="100%"
height="100%"
layout="absolute" >
<mx:RemoteObject destination="Login" id="checkLogin" showBusyCursor="true">
<mx:method name="findAccountList" result="result(event)"/>
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.controls.DataGrid;
import mx.collections.ArrayCollection;
import mx.controls.List;
import mx.rpc.events.ResultEvent;
public var users:ArrayCollection;
//得到传过来的List数据
public function result(event:ResultEvent): void{
dataGrid.dataProvider=event.result.accountList as ArrayCollection;
}
]]>
</mx:Script>
<mx:Panel width="923" title="用户列表" height="296.7" fontSize="20" x="15" y="51">
<mx:DataGrid id="dataGrid" dataProvider="{users}" variableRowHeight="true" width="100%" height="100%">
<!-- 绑定数据 -->
<mx:columns>
<mx:DataGridColumn dataField="account" headerText="用户账号"fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="status" headerText="用户状态" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="username" headerText="用户姓名" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="mobile" headerText="手机号码" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="phone" headerText="电话号码" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="regDate" headerText="有效期" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="city" headerText="城市" fontSize="14" itemRenderer="mx.controls.Label"/>
<mx:DataGridColumn dataField="doit" headerText="请选择操作" fontSize="14" itemRenderer="mx.controls.Label"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Application>
flex datagrid 数据库
补充:Java , Java EE