Disable BeanItem Binding

The problem with the following code is, that I have to reload the combobox while the binding is active. Because of the active binding removeAllItems seems to trigger a setStatus(null) call wich is not what I want. Is it possible to temporarely
disable the binding or is my approach completely wrong ?

Regards
Roger


   bi = new BeanItem<Invoice>(wv);
   view.getCboStatus().setPropertyDataSource(bi.getItemProperty("status"));

private void initComboboxStatus() {
    Select cboStatus = view.getCboStatus();
    cboStatus.removeAllItems();
    List<Status> result = Status.findAll(em);
    for (Status status : result) {
         cboStatus.addItem(status);
    }
    cboStatus.setNullSelectionAllowed(false);
}

Why don’t you just keep the actual selection in a local variable and set it after the update.
So you could also check that the selection is still valid.

Select cboStatus = view.getCboStatus();
Object selection=cboStatus.getValue();
cboStatus.removeAllItems();
boolean selectionValid=false;
List<Status> result = Status.findAll(em);
for (Status status : result) {
  cboStatus.addItem(status);
  if(status.equals(selection)) selectionValid=true;
}
if(selectionValid) cboStatus.setValue(selection);
cboStatus.setNullSelectionAllowed(false);