tags in the following example are valid and equivalent to each other : Data Binding « Data Model « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Data Model » Data BindingScreenshots 
tags in the following example are valid and equivalent to each other
<fx:Binding> tags in the following example are valid and equivalent to each other
            

<!--
Code from Flex Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1proper attribution to Adobe is given as the owner of the user guide; and 
  (2any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->


<!-- binding/ASInBindingTags.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:layout>
        <s:VerticalLayout />
    </s:layout>
    <fx:Script>
         
        public function whatDogAte():String 
            return "homework"
        
      
    </fx:Script>
    <fx:Binding source="'The dog ate my '+ whatDogAte()"
        destination="field1.text" />
    <fx:Binding source="{'The dog ate my '+ whatDogAte()}"
        destination="field2.text" />
    <fx:Binding source="The dog ate my {whatDogAte()}"
        destination="field3.text" />
    <s:TextArea id="field1" />
    <s:TextArea id="field2" />
    <s:TextArea id="field3" />
</s:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Using binding to do an automatic copy to a targetUsing binding to do an automatic copy to a target
2.Making your own bindable variable and bind to TextInputMaking your own bindable variable and bind to TextInput
3.Binding CurlyBinding Curly
4.Bind Data To ModelBind Data To Model
5.Databinding EffectsDatabinding Effects
6.Set enabled property of Validator using data bindingSet enabled property of Validator using data binding
7.Use validator with data binding to validate either the source or destination of the data bindingUse validator with data binding to validate either the source or destination of the data binding
8.Implementing Two-Way BindingsImplementing Two-Way Bindings
9.Implementing Two-Way Bindings with Implementing Two-Way Bindings with <mx:Binding/>
10.Modify Label text through data binding
11.Applying behaviors in MXML using data bindingApplying behaviors in MXML using data binding
12.Use data binding to specify information to the value propertyUse data binding to specify information to the value property
13.data binding between Model and Form controlsdata binding between Model and Form controls
14.Include ActionScript code and E4X expressions as part of the data binding expressionsInclude ActionScript code and E4X expressions as part of the data binding expressions
15.The curly braces syntax and the tag both define a data binding at compile timeThe curly braces syntax and the <mx:Binding> tag both define a data binding at compile time
16.Using data binding with data modelsUsing data binding with data models
17.Curly braces syntax and tag both define a data binding at compile timeCurly braces syntax and <fx:Binding> tag both define a data binding at compile time
18.Make maxFontSize and minFontSize properties that you defined as variables usable as the sources for data bindings expressionsMake maxFontSize and minFontSize properties that you defined as variables usable as the sources for data bindings expressions
19.Data binding examplesUsing data binding with data modelsData binding examplesUsing data binding with data models
20.Data Binding Using Curly Braces SyntaxData Binding Using Curly Braces Syntax
21.Data Validation Through Data BindingsData Validation Through Data Bindings
22.Data Binding Through ActionScript ExpressionsData Binding Through ActionScript Expressions
23.Data Binding Using the Tag in MXML SyntaxData Binding Using the <mx:Binding> Tag in MXML Syntax
24.Use custom function during data bindingUse custom function during data binding
25.Use data binding to make your chart reflect data changes in real time.Use data binding to make your chart reflect data changes in real time.
26.Value With Data BindingValue With Data Binding
27.Value Trigger With Data Binding On ModelValue Trigger With Data Binding On Model
28.Value Trigger With Data Binding for Complex ModelValue Trigger With Data Binding for Complex Model
29.Set the enabled property by using data bindingSet the enabled property by using data binding
30.Using Timer to fire data binding eventUsing Timer to fire data binding event
31.MXML bindingMXML binding
32.Binding control property to a property of another controlBinding control property  to a property of another control
33.More Uses for Curly BracesMore Uses for Curly Braces
34.Using more than one set of curly bracesUsing more than one set of curly braces
35.declare bindings outside of component tagsdeclare bindings outside of component tags
36.databinding syntax escapeddatabinding syntax escaped
37.Binding With Curly BracesBinding With Curly Braces
38.Use tag as an alternative to the curly braces syntaxUse <mx:Binding> tag as an alternative to the curly braces syntax
39.Binding a source property to more than one destination propertyBinding a source property to more than one destination property
40.Defining bidirectional bindingsDefining bidirectional bindings
41.Bind with Binding tagBind with Binding tag
42.Wrap the whole string with {} during BindingWrap the whole string with {} during Binding
43.Converting text to upper with BindingConverting text to upper with Binding
44.Use a static constant as the source for a data-binding expressionUse a static constant as the source for a data-binding expression
45.Create a String variable for bindingCreate a String variable for binding
46.Multiple Destinations bindingMultiple Destinations binding
47.Using multiple tagsUsing multiple <mx:Binding/> tags
48.Multilevel BindingsMultilevel Bindings
49.Simple Binding TestSimple Binding Test
50.Using Binding TagUsing Binding Tag
51.Create a Bidirectional BindingCreate a Bidirectional Binding
52.Create a Bidirectional Binding with Binding tagCreate a Bidirectional Binding with Binding tag
53.Bind to a Property with Binding tag
54.Property BindingProperty Binding
55.Bind to a PropertyBind to a Property
56.Using functions that take bindable properties as argumentsUsing functions that take bindable properties as arguments
57.Use Bindable Property Chains
58.Bind to a FunctionBind to a Function
59.Create Customized Bindable PropertiesCreate Customized Bindable Properties
60.A single bindable property inside curly bracesA single bindable property inside curly braces
61.Concatenate and manipulate the information inside the curly bracesConcatenate and manipulate the information inside the curly braces
62.both source and destination properties must resolve to a bindable property or property chain at compile timeboth source and destination properties must resolve to a bindable property or property chain at compile time
63.When bindable property changes, the function executes, and the result is written to the destination propertyWhen bindable property changes, the function executes, and the result is written to the destination property
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.