I'm a new user to GWT and am having some trouble making a drop down
list. Basically, I want to have a drop down list that will change the
widget shown for a DeckPanel when the value of the drop down list is
changed.
For example, my drop down list will have numbers {1, 2, 3, 4, 5, 6, 7,
8, etc.}. When I select a 1, from the list, I want to go to the
corresponding widget in the DeckPanel.
So my problem is that when I select a value from the drop down list,
the value displayed next to the drop down button when the drop down
list is not in focus seems to change randomly. For example, if I
select "2", the correct widget from the DeckPanel will be displayed,
but the drop down list will display all different kind of values,
could be a 1, 2, 8, etc. There seems to be no pattern to the behavior.
Ideally, when I select a "2", I would like the "2" to be the value
displayed next to the drop down list button. Can anyone provide me
some help?
DeckPanel turbineDetailView = new DeckPanel();
// add some widgets to DeckPanel
private void initTurbineListBox(final ListBox turbineList)
{
for(int i = 0; i < NUM_TURBINES; i++)
{
turbineList.addItem(""+(i+1));
}
turbineList.addChangeHandler(new ChangeHandler()
{
public void onChange(ChangeEvent event)
{
turbineDetailView.showWidget(turbineList.getSelectedIndex());
}
});
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---