int storeIndex = storeSelector.getSelectedIndex();
int storeId = storeSelector.getCurrentElement().getId();
Inventory inventory = new Inventory();
inventory.setStore(storeId);
inventory.commit();
readyToEdit = false;
storeSelector.reload();
storeSelector.setSelectedIndex(storeIndex);
readyToEdit = true;