Two-way Data Binding in Flex 4

In Flex 3 we created a data binding expression using curly braces, like so:

<TextInput label="textInput1" />
<TextInput label="textInput2" text="{textInput1.text}" />

In Flex 3 if you wanted to make the binding two-way, you had to make a second binding expression. However, in Flex 4 you can just add an @ sign to the binding expression to make it two-way, like this:

<s:TextInput label="textInput1" />
<s:TextInput label="textInput2" text="@{textInput1.text}" />

About Fuad Kamal

principal & senior architect, Anaara Media LLC
This entry was posted in Adobe, Flex, Flex 3 -> Flex 4 Migration, Flex 4 and tagged , . Bookmark the permalink.

Comments are closed.