|
|
|
@ -162,7 +162,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GlobalCommand("insertSelectedItem")
|
|
|
|
|
@NotifyChange({ "syncItems", "selItemIndex" })
|
|
|
|
|
@NotifyChange({ "syncItems", "selItemIndex", "selectedItem" })
|
|
|
|
|
public void insertSelectedItem(@BindingParam("selected") RequirementSubject selected, @BindingParam("window") Window window)
|
|
|
|
|
{
|
|
|
|
|
if (selected != null)
|
|
|
|
@ -198,7 +198,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
|
@NotifyChange({ "selectedItem", "syncItems" })
|
|
|
|
|
@NotifyChange({ "selectedItem" })
|
|
|
|
|
public void recalculate(@BindingParam("form") SimpleForm form, @BindingParam("changed") String source)
|
|
|
|
|
{
|
|
|
|
|
if (this.selectedItem == null)
|
|
|
|
@ -222,7 +222,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
|
@NotifyChange({ "selectedItem", "syncItems" })
|
|
|
|
|
@NotifyChange({ "selectedItem" })
|
|
|
|
|
public void onChangeGroup()
|
|
|
|
|
{
|
|
|
|
|
// Někdo změnil skupinu materiálu nebo služby
|
|
|
|
@ -253,7 +253,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
|
@NotifyChange({ "selectedItem", "syncItems" })
|
|
|
|
|
@NotifyChange({ "syncItems", "selectedItem", "selItemIndex" })
|
|
|
|
|
public void addNewItem()
|
|
|
|
|
{
|
|
|
|
|
RequirementItem item = new RequirementItem();
|
|
|
|
@ -268,8 +268,9 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
item.setDescription("");
|
|
|
|
|
item.setMunit(new MUnitEmb());
|
|
|
|
|
|
|
|
|
|
this.setSelectedItem(item);
|
|
|
|
|
this.getDataBean().addItem(item);
|
|
|
|
|
this.setSelItemIndex(this.getDataBean().getItems().indexOf(item));
|
|
|
|
|
|
|
|
|
|
this.selItemIndex = this.getDataBean().getItems().indexOf(item);
|
|
|
|
|
this.selectedItem = item;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|