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

 
 

Share on Google+Share on Google+
Data binding with data model in Flex 3
Posted on: July 14, 2010 at 12:00 AM
Advertisement
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

Advertisement

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


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 14, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com