I am trying to dynamically select the items in a multi select list
component. The list that should be selected comes back to me from my
database as a comma delimited list, which I convert to an array. I am
then trying to compare the array that I made from my list, against a
static array of objects which as used as the dataprovider to my list
component. I have tried everything I can think of to automatically
select the items in the static list, but everything has failed.
Can someone give me a hand with this. HEre is the code that I am
currently working with. statesDP is the static data provider for my
list component.
var licenseArray = result.licenseStates.split(",");
for(var i = 0; i < licenseArray.length; i++){
for(var j = 0; j < statesDP.length; j++){
if(licenseArray[i] ==
statesDP[j].label){
Alert.show(licenseArray[i]);
parentApplication.mainDisplay.rtvr.licenseStates.selectedItems.index = j;
}
}
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/