Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
ComboBox with NewItemHandler
Hei,
I'm developing a grails application with Vaadin.
I have a problem with the NewItemHandler for the component ComboBox.
When I add a new Item very fast, then the NewItemHandler is not called and the ComboBox does not add a new item.
Here is the code sequence:
ComboBox cb= new ComboBox();
cb.setNewItemsAllowed(true);
cb.setImmediate(true);
cb.setNullSelectionAllowed(false);
cb.setNewItemHandler(new NewItemHandler() {
@Override
public void addNewItem(String newItemCaption) {
cb.addItem(newItemCaption);
cb.setValue(newItemCaption);
}
});
So, has anyone an idea how to resolve this problem?
thanks and regards
Elia
Last updated on
You cannot reply to this thread.