Hi Alex, yes, it's a mx:List. How would I go about this in the ITEM_EDIT_END handler, with event.preventDefault() and overwriting the selected item?
Thx martin --- In flexcoders@yahoogroups.com, Alex Harui <aharui@...> wrote: > > Is this an mx:List? It will attempt to write the dataField to the > labelField. You may need a custom ITEM_EDIT_END handler. > > > On 8/9/11 8:04 AM, "Martin Moschitz" <martin@...> wrote: > > > > > > > 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 > > > > > > -- > Alex Harui > Flex SDK Team > Adobe System, Inc. > http://blogs.adobe.com/aharui >