all groups > macromedia flash flash remoting > july 2004 >
You're in the

macromedia flash flash remoting

group:

Binding combobox dataprovider


Binding combobox dataprovider felipedreadlocksfernandes
7/28/2004 9:52:13 PM
macromedia flash flash remoting: I?m new to flash remoting and i?m building a simple aplication but i can?t make
the combobox to work.
I?ve binded the result of a web service to the dataprovider of the combobox
and it display right but the value is alway undefined.
I set it to trace the value at the on change event and it always display
"undefined".
I?m conecting to a coldfusion web service with the webservice conector
component.
The bug is in the flash or in my brain?
Re: Binding combobox dataprovider silkpuppet
7/28/2004 10:29:34 PM
Each object in the array that you are attaching to the ComboBox needs to have a
'data' and 'label' property, e.g.

myArray = [{data:1, label:"first"}, {data:2, label:"second"}];

...where 'data' defines the value and 'label' defines the text that shows up
in the ComboBox for that item.

If your data is not being returned from the server that way, you could try
sticking a DataSet inbetween and using a virtual path in the schema to set the
data and label properties.
Re: Binding combobox dataprovider felipedreadlocksfernandes
7/28/2004 10:39:49 PM
"...If your data is not being returned from the server that way, you could try
setting up virtual properties for 'data' and 'label' in your
WebServiceConnector schema, using the 'path' setting to point to the actual
property."

How do i do this setting?
Re: Binding combobox dataprovider silkpuppet
7/28/2004 10:47:28 PM
Look in the docs under: Using Flash > Data Integration > Advanced topics in
data integration > Schema item settings

Scroll down to "Setting the schema path"

Basically, you'll add two properties to your schema: data and label. Then, for
each of those properties you set the 'path' in the schema to point to the
property you'd like to use for it.
Re: Binding combobox dataprovider felipedreadlocksfernandes
7/28/2004 11:02:05 PM
At the doc it says to use the path property "...For schemas that contain
ActionScript..." or "...For schemas that contain XML data..." but my schema
contains CF Query data type.
Should i change the data type?
Re: Binding combobox dataprovider felipedreadlocksfernandes
7/28/2004 11:27:40 PM
I made it work fine:
AddThis Social Bookmark Button