|
|
@ -126,6 +126,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
@Command
|
|
|
|
|
|
|
|
@NotifyChange({ "selItemIndex", "selectedItem" })
|
|
|
|
public void onFocusItem(@BindingParam("item") RequirementItem item, @BindingParam("ctrl") InputElement ctrl)
|
|
|
|
public void onFocusItem(@BindingParam("item") RequirementItem item, @BindingParam("ctrl") InputElement ctrl)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.selItemIndex = this.getDataBean().getItems().indexOf(item);
|
|
|
|
this.selItemIndex = this.getDataBean().getItems().indexOf(item);
|
|
|
@ -148,13 +149,14 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
@Command
|
|
|
|
@NotifyChange({ "syncItems", "selItemIndex" })
|
|
|
|
@NotifyChange({ "syncItems", "selItemIndex", "selectedItem" })
|
|
|
|
public void removeItem(@BindingParam("form") SimpleForm form, @BindingParam("item") RequirementItem item)
|
|
|
|
public void removeItem(@BindingParam("form") SimpleForm form, @BindingParam("item") RequirementItem item)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (item != null)
|
|
|
|
if (item != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.getDataBean().getItems().remove(item);
|
|
|
|
this.getDataBean().getItems().remove(item);
|
|
|
|
this.setSelItemIndex(-1);
|
|
|
|
this.selItemIndex = -1;
|
|
|
|
|
|
|
|
this.selectedItem = null;
|
|
|
|
this.calcAndUpdateFormTotalPrice(form);
|
|
|
|
this.calcAndUpdateFormTotalPrice(form);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|