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