diegolovison
4 Jan 2011, 3:21 AM
final ComboBox<BeanModel> combo1 = new ComboBox<BeanModel>();
combo1.setStore(store1);
combo1.setDisplayField("name");
combo1.setAllowBlank(false);
final ComboBox<BeanModel> combo2 = new ComboBox<BeanModel>();
combo2.setStore(store2);
combo2.setDisplayField("name");
combo2.setAllowBlank(false);
combo2(Events.Select, new Listener<BaseEvent>() {
@Override
public void handleEvent(final BaseEvent be) {
if (combo1.isValid() && combo2.isValid()) {
// add values on grid
combo1.setValue(null);
combo2.setValue(null);
combo1.clearInvalid();
combo2.clearInvalid();
combo1.focus();
}
}
});
the focus work fine...
but the second combo continue selected (see the trigger button, is blue).. and if the user click out.. will valid the two combobox...
how I can solve this?
thanks
combo1.setStore(store1);
combo1.setDisplayField("name");
combo1.setAllowBlank(false);
final ComboBox<BeanModel> combo2 = new ComboBox<BeanModel>();
combo2.setStore(store2);
combo2.setDisplayField("name");
combo2.setAllowBlank(false);
combo2(Events.Select, new Listener<BaseEvent>() {
@Override
public void handleEvent(final BaseEvent be) {
if (combo1.isValid() && combo2.isValid()) {
// add values on grid
combo1.setValue(null);
combo2.setValue(null);
combo1.clearInvalid();
combo2.clearInvalid();
combo1.focus();
}
}
});
the focus work fine...
but the second combo continue selected (see the trigger button, is blue).. and if the user click out.. will valid the two combobox...
how I can solve this?
thanks