flex repeater控件Repeater is not executing"的异常
来源:互联网 发布:域名备案代理 编辑:程序博客网 时间:2024/05/20 17:24
flex repeater控件注意
Repeater 顾名思义,Repeat就是重复的意思, Repeater 就是用来重复的控件
Repeater 会根据数据源中对象的多少来产生多少个子项,生成的子项全部是以数组形式存在的
<mx:Repeater id="myRepeater" dataProvider="{myArray}">
<mx:HBox>
<mx:LinkButton id="myLabel" label="{myRepeater.currentItem.name}" click="show(event.currentTarget.getRepeaterItem())"/>
<mx:TextInput text="{myRepeater.currentItem.age}"/>
</mx:HBox>
</mx:Repeater>
有个常见的问题:
发现没有,我们平时调用函数时传递Repeater 中的字段作为参数时,是不可以传递的会出现" Repeater is not executing"的异常
但是有getRepeaterItem()这个东东,是解决这个问题的最好的方案
甚至我们不需要传递getRepeaterItem()
传递一个event过去就好了,使用event.currentTarget.getRepeaterItem(),
同样可以获得当前对象的currentItem
,还有一个建议就是我们平时如果能用DataGrid解决的,就不要使用Repeater去处理,Repeater在效率会上大打折扣
建议学习flex的人去http://livedocs.adobe.com/flex/3/html/index.html官方flex文档去看看
虽然英文不好,但是代码我们总能看懂,对学习flex的人大有裨益
- flex repeater控件Repeater is not executing"的异常
- Flex Repeater控件注意
- Repeater控件的四两拨千斤
- 嵌套的Repeater 控件
- Repeater控件的使用
- Repeater控件的使用
- Repeater控件的使用
- Repeater控件的应用
- Repeater控件的应用
- Repeater控件的模板
- Repeater控件的使用
- Repeater控件的使用
- Repeater控件的应用
- Repeater控件的使用
- Flex 下的Repeater嵌套
- Flex控件之repeater和radioButton应用
- Repeater控件
- Repeater控件
- 再读《爱因斯坦传》
- JPA继承关系详解(3)
- 数据字典命中率
- IE的event.srcElement和Firefox的event.target
- 影响Incremental checkpoint position的条件
- flex repeater控件Repeater is not executing"的异常
- ERP制约成功率的四类隐性原因
- 继续摘抄:(ThinkPHP 1.5)基于RBAC的权限访问控制-实例解析
- JavaScript实现拖动改变列宽
- asp检测各服务器组件
- 返回值为什么不能用来区分重载?
- 职场中值得你跟随的十种老板
- 开发人员网站
- 继续摘抄:角色访问控制(Role Based Access Control,RBAC)