From eaf37147dcda9df8e29b128225ea3dd2c827351f Mon Sep 17 00:00:00 2001 From: Franta Pribyl Date: Mon, 20 Oct 2014 10:16:25 +0200 Subject: [PATCH] =?UTF-8?q?Pokud=20je=20v=20polo=C5=BEkov=C3=A9m=20gridu?= =?UTF-8?q?=20vybran=C3=A1=20n=C4=9Bkter=C3=A1=20z=20polo=C5=BEek=20a=20zm?= =?UTF-8?q?=C3=A1=C4=8Dkne=20se=20"Smazat"=20u=20jin=C3=A9=20polo=C5=BEky,?= =?UTF-8?q?=20sma=C5=BEe=20se=20polo=C5=BEka,=20na=20kter=C3=A9=20tla?= =?UTF-8?q?=C4=8D=C3=ADtko=20le=C5=BE=C3=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #159 --- .../isspst/ui/main/orders/requirements/RequirementForm.java | 6 ++++-- src/main/webapp/main/orders/requirements/reqForm.zul | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 @@