I'm trying to populate a ComboBox using a Webservice and am
having some issues. In ColdFusion, you can assign columns from a
query to the lable and value attributes in a cfselect tag. In Flex,
there is a labelField attribute within the mx:ComboBox tag but
there is no data or value attribute to assign the value. Am I
missing something or is there a specific attiribute I need to use
to assign the mx:ComboBox value to a column from my WebService? If
I hard code the information in an Array or ArrayCollection I can
speficy the mx:ComboBox value using the mx:Object tag, but this
defeats the purpose of having a dynamically populated application,
not to mention that it will be difficult to maintain with data that
yeah it is different. I figured it out today and its pretty
cool. you assign the combobox dataprovider as the webservice, then
you use the labelField property as what you want to see. now, when
you click on any item in the combobox and get any field returned
from the webservice with the comboboxid.selecteditem.fieldname...
basically now you can return many items for a combobox and show 1
as the label and get any of the other data from the selecteditem.
simular to a datagrid. pretty cool if you ask me... goog
Thanks for the reply. I was reading through some other posts
last night and followed the code of another person who was trying
to use the ComboBox to interact with other areas within his site. I
changed the mx:request within the mx:WebService tag set and changed
my code just like you stated above and it worked!!
I'm finding out that you really have to think when making the
transition from ColdFustion to Flex. The documentation doesn't
compare the functionality in both applications and provide
ColdFusion develpers with a quick reference on the language changes
between the two. Maybe someone will capture all the differences and
publish a book someday. That would be great!!