Thanks to everyone for suggestions. I am having a combo in which the values are dynamically coming from DB thru java WS. The case is, when i select a country for instance say "India", the code for the corresponding selection "IN" is saved to the DB thru java WS during SAVE action. When i retrieve the value in future, I am given only the countrycode "IN". Using this code, I have to show the countryname on label property of my combo. I am currently looping thru the arraycol(dataprovider) for checking the code for "IN" and setting the arraycol index to combo.selectedIndex. I cannot use switch() here as the values are dynamic from DB.
Is there any other better way of doing this...? Thanks in advance!!! Regards, Ganesh Sundar R. --- In [email protected], Jeffry Houser <j...@...> wrote: > > > I started to give him a similar answer, but then realized he may be > talking about setting the selectedItem on the ComboBox. He mentioned he > already had a labelField which seems to be exactly what he needs for > display purposes without a complicated switch statement. > > Ganesh, if neither answer helps you, could you elaborate on the problem? > > Mark Lapasa wrote: > > > > > > look at combo boxes labelfunction > > the function will then inspect the countrycode and you'll have a nasty > > switch statement that will output the correct country name > > > > -mL > > > > gan_sun2006 wrote: > > > > > > > > > Hi, > > > > > > I am using combobox for which the bound data is coming from an > > > arraycollection. My arraycollection has two properties called > > > countryname(labelField) and countrycode. When i submit my page, the > > > countrycode from my combo is saved to the DB. During retrieval I am > > > given only countrycode and not countryname. > > > > > > How can I show the equivalent countryname as selectedItem in my > > > combobox? Presently I am looping through the arraycollection and > > > showing the equivalent countyname. Is there any other way to do it? > > > > > > Any help is highly appreciated... > > > > > > Regards, > > > Ganesh Sundar R. > > > > > > > > > > Notice of confidentiality: > > The information contained in this e-mail is intended only for the use > > of the individual or entity named above and may be confidential. > > Should the reader of this message not be the intended recipient, you > > are hereby notified that any unauthorized dissemination, distribution > > or reproduction of this message is strictly prohibited. If you have > > received this message in error, please advise the sender immediately > > and destroy the e-mail. > > > > > > -- > Jeffry Houser, Technical Entrepreneur > Adobe Community Expert: http://tinyurl.com/684b5h > http://www.twitter.com/reboog711 | Phone: 203-379-0773 > -- > Easy to use Interface Components for Flex Developers > http://www.flextras.com?c=104 > -- > http://www.theflexshow.com > http://www.jeffryhouser.com > -- > Part of the DotComIt Brain Trust >

