Bind with BindingUtils.bindSetter : BindingUtils « Data Model « Flex






Bind with BindingUtils.bindSetter

Bind with BindingUtils.bindSetter
         
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="initHandler();">
       <mx:Script>
           
                  import mx.binding.utils.ChangeWatcher;
                  import mx.binding.utils.BindingUtils;

                  private var myChangeWatcher:ChangeWatcher;

                  private function initHandler():void
                  {
                       myChangeWatcher = BindingUtils.bindSetter( invalidateName, nameInput, "text" );
                  }
                  private function invalidateName( arg:* ):void
                  {
                          nameField.text = nameInput.text;
                  }
      
    </mx:Script>

    <mx:Panel title="User Entry.">
         <mx:TextInput id="nameInput" />
         <mx:Text id="nameField" />
    </mx:Panel>

</mx:Application>

   
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use BindingUtils to bind propertyUse BindingUtils to bind property
2.Data Binding Through the ActionScript BindingUtils ClassData Binding Through the ActionScript BindingUtils Class
3.Bind Model with BindingUtils.bindPropertyBind Model with BindingUtils.bindProperty
4.Bind Setter using setter methodBind Setter using setter method