Repeater本质上是一个循环的描述,就是说,你放在Repeater部分的任何组件,就会按照数据源的项目个数循环显示,形成一个列表。
它类似于List的概念,但比List更为灵活。
它类似于 Java 的 JSTL 标签 <forEach> 以及 Struts2 的 <iterator> 标签
它类似于List的概念,但比List更为灵活。
它类似于 Java 的 JSTL 标签 <forEach> 以及 Struts2 的 <iterator> 标签
<mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; [Bindable] private var employeeData:ArrayCollection; private function resultHandler(event:ResultEvent):void { employeeData = event.result.root.employee; fileList.dataProvider = employeeData; } ]]> </mx:Script> <mx:HTTPService id="employeeService" url="assets/data/employee.xml" result="resultHandler(event)" /> <mx:Repeater id="fileList" width="100%" height="100%"> <mx:Image source="{fileList.currentItem.face}" width="100" height="100"/> </mx:Repeater>