0
votes

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.

1
It sounds to me like you haven't implemented your itemRenderer to respond to dataChange events and modify the elements inside your renderer. However, without seeing the code it is hard to give a concrete answer.JeffryHouser

1 Answers

0
votes

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:

<s:Label text="{data.someLabel}" />

if there is any additional action that needs to be taken, look to override the data setter:

public override function set data(value:Object):void{
    super.data = value;
    //do anything else that is required.
}