Bind TextInput to ArrayCollection with BindingUtils : TextInput Data Binding « Components « Flex






Bind TextInput to ArrayCollection with BindingUtils

Bind TextInput to ArrayCollection with BindingUtils
          

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Script>
        
            import mx.binding.utils.BindingUtils;
            
            public function doBinding():void 
            {
                BindingUtils.bindProperty(myTextInput, "text", myAC.getItemAt(0), "author");                
            }
      
    </mx:Script>
    
    <mx:Binding source="myAC.getItemAt(0).urlData" destination="myLabelDest.text"/>
    
    <mx:ArrayCollection id="myAC">
        <mx:source>
        <mx:Object urlData="http://a.com" author="a"/>
        <mx:Object urlData="http://b.com" author="b"/>
        <mx:Object urlData="http://c.com" author="c"/>
        </mx:source>
    </mx:ArrayCollection>
    <mx:Label id="myLabelDest"  text="prova" />
    <mx:TextInput id="myTextInput" text=""/>
    <mx:Button label="BindingUtils" click="doBinding()" />
        
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Sets value for a public variable and bind to TextInputSets value for a public variable and bind to TextInput
2.Model with data binding to TextInputModel with data binding to TextInput
3.Binding to a TextInput controlBinding to a TextInput control
4.Binding 2 way between Form TextInput fieldsBinding 2 way between Form TextInput fields
5.Binding one TextInput to another TextInputBinding one TextInput to another TextInput
6.Bind variable to a TextInputBind variable to a TextInput
7.Bind TextInput to TextBind TextInput to Text
8.Bind TextInput to ModelBind TextInput to Model
9.Convert value in TextInput to number and bindConvert value in TextInput to number and bind
10.Use tag to define a data binding from a TextInput control to a Label controlUse <fx:Binding> tag to define a data binding from a TextInput control to a Label control
11.Bind data entered in a TextInput control to a data modelBind data entered in a TextInput control to a data model
12.Bind Label control to TextInput control's textBind Label control to TextInput control's text
13.Use one tag along with curly brace syntax to bind the Label control's text to two different TextInput controlsUse one <mx:Binding/> tag along with curly brace syntax to bind the Label control's text to two different TextInput controls
14.Binding a Text and TextInputBinding a Text and TextInput
15.Use curly braces ({}) syntax to show a Text control that gets its data from a TextInput control's text propertyUse curly braces ({}) syntax to show a Text control that gets its data from a TextInput control's text property
16.Use curly braces ({}) syntax to show a Label control that gets its data from a TextInput control's text propertyUse curly braces ({}) syntax to show a Label control that gets its data from a TextInput control's text property
17.Show a method with two parameters bound to the text properties of TextInput controls.Show a method with two parameters bound to the text properties of TextInput controls.
18.Bound TextInput ControlBound TextInput Control
19.Cause a TextInput to modify the LabelCause a TextInput to modify the Label