Be sure your post includes:
UsingSmartGwt 2.4
I am fairly new to smart gwt.I am having problems with my comboBox.The problem is when I select "1" the window alerts "2" and when I select "2" the window alerts "1".But when I make my first selection the alert is blank.
I am trying to get the value of the comboBox.Am I using the wrong method?
UsingSmartGwt 2.4
I am fairly new to smart gwt.I am having problems with my comboBox.The problem is when I select "1" the window alerts "2" and when I select "2" the window alerts "1".But when I make my first selection the alert is blank.
I am trying to get the value of the comboBox.Am I using the wrong method?
Code:
myCombo.setTitle("How Many");
myCombo.setType("comboBox");
myCombo.setValueMap("1", "2");
myCombo.addChangeHandler(new ChangeHandler(){
@Override
public void onChange(ChangeEvent event) {
String howMany = myCombo.getDisplayValue();
Window.alert(howMany);
}
});
Comment