|
|
|
@ -126,6 +126,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@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<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|