Helpful Information
 
 
Category: Apache Flex
Flex 3 -- Help with ComboBox and Web Services

Hello!

I have 5 comboBox controls in my FLex app which each pull from a Web Service. When the first comboBox has been selected, a 'change();' event is fired off and it calls the Web Service method to populate the next comboBox. This is repeated for all of them.

It all works great except there is ONE tiny lil bug I can't seem to correct. If the comboBox gets populated with only ONE item, then of course the 'change()' event never gets called, so the user cannot continue to the next selection.

Is there any other way to maybe push an additional value onto the comboBox array AFTER it is filled from the webServices data? So rather than it just being filled with the one item I will push "Choose available color" into the first array slot.

I am sure there is a way, just unsure of HOW after it has been filled dynaimcally?

ThanksCF! :thumbsup:

Perhaps you could add a private method on all the combo boxes that is called when the data is loaded. It would check to see if the combo had only one item and call the next web service if it did.










privacy (GDPR)