Explain how binding works in mxml components in flex?
Submitted by: AdministratorBinding in MXML
Lets look at the following code…
<mx:TextInput id=”ti1?/>
<mx:Label id=”label1? text=”{ti1.text}”/>
Here you are binding the text property of the TextInput to the label. So whatever you type in the textInput automatically reflects in the label. That’s the power of Binding…
The best practice for defining components that return information back to the main application is to design the component to dispatch an event that contains the return data. In that way, the main application can define an event listener to handle the event and take the appropriate action. You also use events in data binding. The following example uses the Bindable metadata tag to make useShortNames a bindable property. The implicit setter for the useShortNames property dispatches the change event that is used internally by the Flex framework to make data binding work.
Submitted by: Administrator
Lets look at the following code…
<mx:TextInput id=”ti1?/>
<mx:Label id=”label1? text=”{ti1.text}”/>
Here you are binding the text property of the TextInput to the label. So whatever you type in the textInput automatically reflects in the label. That’s the power of Binding…
The best practice for defining components that return information back to the main application is to design the component to dispatch an event that contains the return data. In that way, the main application can define an event listener to handle the event and take the appropriate action. You also use events in data binding. The following example uses the Bindable metadata tag to make useShortNames a bindable property. The implicit setter for the useShortNames property dispatches the change event that is used internally by the Flex framework to make data binding work.
Submitted by: Administrator
Read Online Adobe Flex Actionscript Job Interview Questions And Answers
Top Adobe Flex Actionscript Questions
☺ | What does calling preventDefault() on an event do? How is this enforced? |
☺ | How do you add event listeners in mxml components. Now AS3 components? |
☺ | What is the difference between ChangeWatcher.watch, and BindingUtils.bindProperty? |
☺ | Is it possible to make httpService Requests synchronous in adobe flex? |
☺ | Explain How many levels does Flash MX support? |
Top Adobe Categories
☺ | Adobe Photoshop Interview Questions. |
☺ | Adobe Illustrator Interview Questions. |
☺ | Adobe Flash Interview Questions. |
☺ | Adobe Flex Actionscript Interview Questions. |
☺ | Photoshop Expert Interview Questions. |