PDA

View Full Version : SimpleComboBox problem after upgrade to gxt 2.1



cutout33
27 Jan 2010, 1:35 AM
Hi All,

I developed most of my application using gxt 2.0.1 and now am trying to upgrade to 2.1, my problem is all SimpleComboBox I use is now just displaying the selected item so if I expand the box I only see the selected value and not the other values =P~

here is how I use SimpleComboBox


public static SimpleComboBox<String> getYesNoComboBox(ModelData model,
String propertyName, String label) {
SimpleComboBox<String> yesNoCombo = new SimpleComboBox<String>();
SimpleComboBoxFieldBinding binding = null;
binding = new SimpleComboBoxFieldBinding(yesNoCombo, propertyName);
binding.bind(model);
yesNoCombo.setEmptyText(translations.selectCode());
yesNoCombo.setFieldLabel(label);
yesNoCombo.setEditable(false);
yesNoCombo.setAllowBlank(false);
yesNoCombo.add("Y");
yesNoCombo.add("N");
String value = model.get(propertyName);
if (value == null || !value.equalsIgnoreCase("y")) {
yesNoCombo.setValue(yesNoCombo.getStore().getAt(1));
} else {
yesNoCombo.setValue(yesNoCombo.getStore().getAt(0));
}
return yesNoCombo;
}

and attached is a screen shot to what I get!

thanks in advance

micgala
28 Jan 2010, 2:36 AM
Hi.

Try to set this:



yesNoCombo.setTriggerAction(TriggerAction.ALL);
Regards,
Michel.

cutout33
30 Jan 2010, 11:13 PM
Thanks man it worked :)