Flex Data Modal Example


 

Flex Data Modal Example

In this tutorial we have illustrate how to use Date Modal in flex application and what process to use it.

In this tutorial we have illustrate how to use Date Modal in flex application and what process to use it.

DataModal in Flex:-

If user want to store application specific data then use data model that is provide a way to store the data before sending data on the server or store the data before to display the data by the application. This process have done with the help of <mx:Model>tag. In this example we have discuss about data model.

Example:-

<?xml version="1.0"?>

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

<mx:Model id="address">

<info>

<country>{country.text}</country>

<state>{state.text}</state>

<distric>{distric.text}</distric>

<town>{town.text}</town>

<name1>{name1.text}</name1>

<email>{emailInput.text}</email>

</info>

</mx:Model>

<mx:Panel title="Data Modal Example" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" >

<mx:TextInput id="country" text=""/>

<mx:TextInput id="state" text=""/>

<mx:TextInput id="distric" text=""/>

<mx:TextInput id="town" text=""/>

<mx:TextInput id="name1" text=""/>

<mx:TextInput id="emailInput" text=""/>

</mx:Panel>

</mx:Application>

In this example you can see data that are address type is store in the data model before sending on the server.

Output:-

 

Ads