GXT (Ext GWT) issue with SimpleComboBox

When creating a GXT SimpleComboBox (as in the accepted answer here ),

    final FormPanel fp = new FormPanel();

    SimpleComboBox<String> combo = new SimpleComboBox<String>();
    combo.add("One");
    combo.add("Two");
    combo.add("Three");
    combo.setSimpleValue("Two"); // I'd like to preselect that value

    fp.add(combo);
    RootPanel.get().add(fp);

my combo box only contains the value Two. The values ​​"One" and "Three" are completely removed from the combo box. This does not happen when I delete a linecombo.setSimpleValue("Two");

I am using GXT 2.2.3 and GWT 2.2.0 (tested on Linux / Firefox and Linux / Chrome). Is this a bug / did it work in older versions of GXT / GWT, or am I doing something wrong?

Update

I accepted the answer and it solves the problem: add a line

combo.setTriggerAction(TriggerAction.ALL);

But I'm still looking for an explanation!

+5
source share
3 answers
+4

, combobox. - , , , .

"" , , - "" , , , "" .

+8

You probably need to install combo.setForceSelection(true);

0
source

All Articles