List itemRenderer 缓存项目
我在 mx:list 中使用 itemRenderer,它有许多文本字段和组合,我使用此项目渲染器来编辑数组集合中的项目,arrayCollection 中的每个项目都是 Action 类型,它来自 BlazeDS 远程处理作为 valueObject。
我的问题是,当我通过此代码将 Action 类型的新项目添加到列表 dataProvider (ArrayCollection) 时,
myList.dataProvider.addItem(new Action());
新项目从其前一个项目中获取相同的数据。
i am using an itemRenderer in mx:list, it has many text fields and combos, i use this item renderer to edit items in array collection, each item in the arrayCollection is of type Action which comes from BlazeDS remoting as a valueObject.
my problem is when i add new item of type Action to the list dataProvider (ArrayCollection) by this code
myList.dataProvider.addItem(new Action());
the new item tooks the same data from its previous item.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的项目渲染器中,请确保绑定到数据对象,因为这是 flex 将设置为要渲染的数据提供程序中的当前项目的内容。它就像这样简单:
如果需要采取任何其他操作,请尝试覆盖数据设置器:
In your item renderer, be sure to bind to the data object, as this is what flex will set as the current item from your data provider to be rendered. It would be as simple as:
if there is any additional action that needs to be taken, look to override the data setter: