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
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