Not yet rated
Tags:



Problem

I want to populate form fields using the item selected from a ComboBox within my Flex application.

Solution

DataBinding will solve your problem

Detailed explanation

Get the results from a PHP service as a list of objects

private var Employee_ARRAY:ArrayCollection=
            [{Eid:"12", Name:"#FF0000",phone:12345},
            {Eid:"13", Name:"#00FF00",phone:12345},
            {Eid:"14", Name:"#0000FF",phone:12345}];
<s:ComboBox id="cmb" dataProvider="{Employee_ARRAY}"/>
<s:Label text="{cmb.selectedItem.Name}"/>
<s:Label text="{cmb.selectedItem.phone}"/>

+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes