This content has been marked as final. Show 4 replies
1) make sure the array collection that serving as dataProvider for this list is marked as [Bindable]
2) call the addItem() method on this array collection when you want to add a new item to the list
the newly added item in the array collection would appear automatically in your list.
I get what you mean, but I don't have an array collection here, becuase I am just taking the text input's data and feeding that to the list. I have a text input field and one button, when the code fires on this button, the update on the list happens that's all.
Does this mean I have to first create the array collection , have the textinput push it's items to the array and then take it from there ?...Isn't too many steps ?
what's the data provider for the list currently?
Yes. This may look like too many steps, but that how you separate your view from model in MVC pattern.
The data provider for this is a text input field in which I type some stuff. That stuff gets into the list box...