Hey there,

I can't figure out the problem, maybe you can help me out.

My List has an ArrayCollection as a DataProvider. It contains objects with a 
number of properties, amongst others:
AktID, AktName, AktPrice, etc.

I have an itemRenderer which is also the itemEditor. I set the 
itemEditorDataField to "data". Now, whenever I edit the AktName, it gets 
overwritten with the whole object. Anything I am not seeing here?

<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";>
        <mx:Script>
                <![CDATA[
                        private var _data : Object;

                        override public function set data( value : Object ) : 
void {
                                super.data = value;
                                _data = value;
                                if ( data != null ) {
                                        AktName.text = _data.AktName;
                                        AktPrice.text = _data.AktPrice;
                                }
                        }

                        override public function get data() : Object {
                                return _data;
                        }
                ]]>
        </mx:Script>
        <mx:TextInput id="AktName"
                          width="150"
                          textAlign="left" change="_data.AktName=AktName.text"/>
        <mx:Label id="AktPrice"
                           text="25"
                          textAlign="right"
                          width="40"
                          minWidth="40"/>
</mx:HBox>

Thanks,
Martin

Reply via email to