Select to view content in your preferred language

combobox default value

1306
9
Jump to solution
01-20-2014 03:15 AM
fatenodeh
Deactivated User
Hello,

I have a widget with three combo boxes. i need to keep a specific value as a default value.
i added the following two line of code in fillComboBoxGovs() function

cbGovName.selectedIndex=1;          fillComboBoxDist();

i attached the code of the widget. its should be a little update but i'm new in flex and stuck with this.

Thank you
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Faten,

  That makes a lot more sense then. OK all you need to do is call fillComboBoxGovs() from the widgetOpenedHandler function then.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

View solution in original post

0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus
faten,

   Can you explain a little more? What is and is not occurring?
0 Kudos
fatenodeh
Deactivated User
Sorry i forget to explan that the widget work correctly for the first time but if i lunch the widget again the first combobox empty. I want to keep the default value in the first combo box.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Faten,

  That makes a lot more sense then. OK all you need to do is call fillComboBoxGovs() from the widgetOpenedHandler function then.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

0 Kudos
fatenodeh
Deactivated User
Thank you. I called fillComboBoxGovs() function and the default value displayed. but once i click on widget seems setBusyCursor() function fired and widget hang-up. ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Faten,

   Before you made the change I suggested did the first combobox have the values still when the widget was reopened and the issue was only that the default value was not selected (did the combobox still have all the values)?
0 Kudos
fatenodeh
Deactivated User
Yes before and after your suggestion the combobox has values. After the update you suggest the default value displayed but widget seems hang-up the first time i open it. And work correctly the second time i reopen it.
0 Kudos
fatenodeh
Deactivated User
Yes before and after your suggestion the combobox has values. After the update you suggest the default value displayed but widget seems hang-up the first time i open it. And work correctly if i open another widget before reopen it.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
faten,

   If the combobox is still populated then instead of running the fillComboBoxGovs() again, try just setting the selectedIndex on the Combobox instead, on the widget open function.
0 Kudos
fatenodeh
Deactivated User
This solved my priblem thanks
0 Kudos