In a change handler:

var xmlOption:XML = XML(event.target.selectedItem);

var sData:String = [EMAIL PROTECTED];

 

Tracy

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of dbronk
Sent: Tuesday, February 05, 2008 2:06 PM
To: [email protected]
Subject: [flexcoders] ComboBox fed via xml

 

I have and XML field with contents:
<field>
<option label="option 1" data="1" />
<option label="option 2" data="2" />
<option label="option 3" data="3" />
</field>

My combobox has dataprovider="{xml.option}" labelField="@label"

My problem is the how do I specify which data field to use. The combo
box appears correctly with this code but the data values are not on
the combobox.

Changing this to an ArrayCollection of {"label":"option 1",
"data":"1"} ... objects and point the DP to this collection it works
fine.

Help please.

Thanks,
Dale

 

Reply via email to