PDA

View Full Version : [FIXED] ComboBox allowBlank : wrong validation



zaccret
26 May 2008, 11:55 PM
On a ComboBox, I use setAllowBlank(false) to not permit blank values. But the first time I select a value, I get the error message. If I select another value, the error message disappears.
I work on Windows XP, and the bug reproduces in hosted and web mode with FF3 or IE6.


public void onModuleLoad() {
Viewport viewport = new Viewport();

final FormPanel panel = new FormPanel();
panel.setHeading("Form panel");
panel.setWidth(400);

final ComboBox combo = new ComboBox();
combo.setEmptyText("Select a value");
combo.setAllowBlank(false);
combo.setFieldLabel("File");
final ListStore store = new ListStore();
BaseModel model = new BaseModel();
model.set("text", "N/A");
store.add(model);
combo.setStore(store);
panel.add(combo);
TextField textField = new TextField();
textField.setFieldLabel("Text field");
panel.add(textField);

viewport.add(panel);

RootPanel.get().add(viewport);
}

darrellmeyer
27 May 2008, 8:45 PM
Fixed in SVN.