<mx:Binding source="state.text" destination="contact.state"/>
<mx:Binding source="zip.text" destination="contact.zip"/>
<mx:Binding source="phone.text" destination="contact.phone"/>
<mx:HDividedBox width="100%" height="100%">
<mx:Panel title="Contact List" width="100%" height="100%">
<mx:DataGrid id="dg" dataProvider="{contacts}" width="100%"
height="100%"
change="contact=Contact(dg.selectedItem)" >
<mx:columns>
>
headerText="First Name"/>
Name"/>
</mx:columns>
</mx:DataGrid>
<mx:ControlBar>
<mx:TextInput id="searchText" width="100%"
enter="searchContacts()"/>
<mx:Button label="Search" click="searchContacts()"
width="60"/>
</mx:ControlBar>
</mx:Panel>
<mx:Panel title="Details [{dg.selectedIndex!=-1?contact.firstName+'
'+contact.lastName:'New Contact'}]" width="100%" height="100%">
<mx:Form width="100%" height="100%" label="General">
<mx:FormItem label="First Name" required="true">
text="{contact.firstName}"/>
</mx:FormItem>
<mx:FormItem label="Last Name" required="true">
text="{contact.lastName}"/>
</mx:FormItem>
<mx:FormItem label="Address">
text="{contact.address}"/>
</mx:FormItem>
<mx:FormItem label="City">
text="{contact.city}"/>
</mx:FormItem>
<mx:FormItem label="State">
text="{contact.state}"/>
66
Using the Flex Data Service Assembler
<mx:DataGridColumn dataField="contactId" headerText="Id"/
<mx:DataGridColumn dataField="firstName"
<mx:DataGridColumn dataField="lastName" headerText="Last
<mx:TextInput id="firstName" width="250"
<mx:TextInput id="lastName" width="250"
<mx:TextInput id="address" width="250"
<mx:TextInput id="city" width="250"
<mx:TextInput id="state" width="250"
Need help?
Do you have a question about the COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 and is the answer not in the manual?