Home Tutorial Flex Flex-components Data binding with data model in Flex 3

 
 

Data binding with data model in Flex 3
Posted on: July 14, 2010 at 12:00 AM
In this example we have used data model for binding data for objects.

Data binding with data model:-

In this example we have used data model for binding data for objects.

Example:-

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Model id="datamodel">

<data>

<firstname>{firstname.text}</firstname>

<lastname>{lastname.text}</lastname>

</data>

</mx:Model>

<mx:TextInput id="firstname" width="200"/>

<mx:TextInput id="lastname" width="200"/>

<mx:Label text="{datamodel.firstname}"/>

<mx:Label text="{datamodel.lastname}"/>

</mx:Application>

output:-

Running Example:

Download this code

Related Tags for Data binding with data model in Flex 3:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.