Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Strange ComboBoxItem problem

    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?
    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);
    				
    		}
         });

    #2
    Wow I feel silly.That should have been an changedHandler.

    Comment

    Working...
    X