Tree
When the data source is the lastResult object of an RPC service call and the resultFormat property of the RPC component is set to "object", you should use the ArrayUtil.toArray() method to ensure that the object is an Array when you bind it to an ArrayCollection object, as the following example shows:
<s:ArrayCollection id="employeeAC" source="{ArrayUtil.toArray(employeeSrv.lastResult.employees.employee)}"/>
http://www.adobe.com/devnet/flex/quickstarts/using_containers.html
http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7be0.html
本文介绍在Flex中如何正确地将RPC服务调用的结果绑定到ArrayCollection对象上。特别是当RPC组件的结果格式设置为对象时,需要使用ArrayUtil.toArray()方法确保数据源能适配ArrayCollection的要求。

被折叠的 条评论
为什么被折叠?



