diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java index 1d7d4a0a..86288c26 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java @@ -126,6 +126,7 @@ public class RequirementForm extends FormViewModel } @Command + @NotifyChange({ "selItemIndex", "selectedItem" }) public void onFocusItem(@BindingParam("item") RequirementItem item, @BindingParam("ctrl") InputElement ctrl) { this.selItemIndex = this.getDataBean().getItems().indexOf(item); @@ -148,13 +149,14 @@ public class RequirementForm extends FormViewModel } @Command - @NotifyChange({ "syncItems", "selItemIndex" }) + @NotifyChange({ "syncItems", "selItemIndex", "selectedItem" }) public void removeItem(@BindingParam("form") SimpleForm form, @BindingParam("item") RequirementItem item) { if (item != null) { this.getDataBean().getItems().remove(item); - this.setSelItemIndex(-1); + this.selItemIndex = -1; + this.selectedItem = null; this.calcAndUpdateFormTotalPrice(form); } } diff --git a/src/main/webapp/main/orders/requirements/reqForm.zul b/src/main/webapp/main/orders/requirements/reqForm.zul index 4894234c..e40e95c0 100644 --- a/src/main/webapp/main/orders/requirements/reqForm.zul +++ b/src/main/webapp/main/orders/requirements/reqForm.zul @@ -207,7 +207,7 @@