3 Replies Latest reply on Dec 23, 2011 5:42 AM by YonasKolb

    ItemRenderer: data binding on TextInput doesn't work

    johanwalem

      Hello,

       

      I want to use databinding with the data object of a ItemRenderer but, when I databind it with a TextInput field, this data object doesn't update when I change the input of the Textfield

       

      I've tried to, in the creation complete event of the renderer, initialize the original VO object, but that doesn't work. (the object in question is Bindable)

       

      [Bindable]
      private var thisTicketVo:TicketVO;

      protected function itemrenderer1_creationCompleteHandler(event:FlexEvent):void{
           thisTicketVo = TicketVO(data);
      }

       

      <s:TextInput  borderVisible="false" id="txtPrice"

      left="5" right="0" top="8" bottom="1" color="#404141" fontFamily="Arial"fontSize="15" kerning="off" lineHeight="180%" text="{thisTicketVo.price}"

                                                                    whiteSpaceCollapse="preserve"prompt="Price"

                                                                    skinClass="components.general.forms.txtInputNoBorderSkin">

       

      The initial value of this VO object comes into the textField, but when I update this textField, the value of the databinded object ThisTicketVO doesn't change.I've also tested with text="{TicketVO(data).price}", but that changed nothing.

       

      Does someones sees what I did wrong? Thanks.