and I use actionscript to assign the dataprovider:
filterList.dataProvider = model.ADEPTList; (where model.ADEPTList is an ArrayCollection)
When I use an event to update model.ADEPTList the data does not show up in the list.
HOWEVER,
if I instead declare the dataprovider in the MXML like this:
< s:List id="filterList" allowMultipleSelection="true" width="100%" height="100%" dataProvider="{model.ADEPTList}"/>
When the event updates model.ADEPTList it DOES show up in the list. Why is this and how can I get the list to update when assigning the dataprovider using actionscript? Thanks
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
这是因为这只是一个分配,您没有将列表的 dataProvider 绑定到 model.ADEPTList。
您必须阅读有关 flex 绑定机制的更多信息。在 AS3 中你可以使用:
That's because that's only an assignment, you're not binding your list's dataProvider to model.ADEPTList.
You have to read more about flex binding mechanisms. In AS3 you could use: