http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=111
From: "Tracy Spratt" <[EMAIL PROTECTED]>
Sent: Thursday, February 24, 2005 2:51 PM
To: [email protected]
Subject: RE: [flexcoders] Pre-selecting a Combo Box from Bound Data
I knowit seems strange, but you will really have to iterate through the
items, compare the values, and set the selected index on the matching
item.
Maybe the next version of ComboBox will do this for us.
Tracy
-----Original Message-----
From: stealthbaz [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 24, 2005 4:28PM
To: [email protected]
Subject: [flexcoders] Pre-selecting a Combo Box from Bound Data
Situation:
I have a component, and that component has an Actionscript objectin
it that will hold the data passed into it.
I also have a form. I want to populate the form with information that
has come in on that object. Tutorials abount on how to do this, but
one thing I can't seem to get to work is selecting the correct item in
a combo box based on the object passed in.
Now, I know i could write action script to determine which index
should be selected, but it doesnt seem to come as cheaply as a simple
data binding on a form element in othercases.
e.g.:
---------------------------------------------------------------
....
var slot:Object;
....
---------------------------------------------------------------
Will pre-populate the form element with the value of the name
property on the slot Object.
So how does thiswork as simply for a combo box?
e.g.:
---------------------------------------------------------------
....
var slot:Object;
var statusTypes = [{label:"Unknown", data:"Unknown"}, {label:"Live",
data:"Live"}, {label:"Shutdown", data:"Shutdown"}];
.....
---------------------------------------------------------------
THe above snippit will show the list of options, but I dont see how to
get the list to be selected to the correct item, based on the
"slotStatus" value of my object "slot"
Thoughts?
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

