You can't.  getValue assumes the .data property.  I'd just bind to some
property/attribute in selectedItem

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of dbronk
Sent: Tuesday, February 05, 2008 11:06 AM
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