1 Reply Latest reply on Mar 6, 2008 4:35 PM by ntsiii

    XML Binding

    paulo.larini Level 1
      Hi, I use a XML to bind to some controls. For example:
      <car>
      <color>blue</color>
      <year>2000</year>
      ...
      So my controls are binded to color and year nodes.
      Now I change the textInput that is binded with the year node to "2005"
      After this, I change the color node using myCar.color="red"

      the textInput year goes back to 2000.

      It seans that if I change any node of the XML, all binds are refreshed.

      There is a way to prevent this?

      thanks.
        • 1. Re: XML Binding
          ntsiii Level 3
          Default binding is ONE-WAY. It only makes the TextInput display the value in the XML. It does NOT automatically update the xml.

          You need to have the TextInlput change update the xml node.

          Do this in the change event:
          <mx:TextInput id="tiColor" ... change="xmlCar.color=tiColot.text" />

          Tracy