use of org.zkoss.bind.annotation.Command in project collect by openforis.
the class SurveySelectVM method editSelectedSurvey.
@Command
public void editSelectedSurvey() throws IOException {
CollectSurvey temporarySurvey = loadSelectedSurveyForEdit();
SurveyEditVM.redirectToSurveyEditPage(temporarySurvey.getId());
}
use of org.zkoss.bind.annotation.Command in project collect by openforis.
the class SchemaVM method openMoveNodePopup.
@Command
public void openMoveNodePopup() {
SchemaNodeData selectedTreeNode = getSelectedTreeNode();
if (selectedTreeNode == null) {
return;
}
SurveyObject selectedItem = selectedTreeNode.getSurveyObject();
if (selectedItem instanceof NodeDefinition) {
NodeDefinition selectedNode = (NodeDefinition) selectedItem;
boolean changeParentNodeAllowed = checkChangeParentNodeAllowed(selectedNode);
if (changeParentNodeAllowed) {
openSelectParentNodePopupForReparent(selectedNode);
}
} else {
// TODO support tab moving
return;
}
}
use of org.zkoss.bind.annotation.Command in project collect by openforis.
the class SchemaVM method addChildTab.
@Command
@NotifyChange({ "treeModel", "selectedTab" })
public void addChildTab(@ContextParam(ContextType.BINDER) Binder binder) {
if (checkCanAddChildTab()) {
UITab parentTab = getSelectedNodeParentTab();
addTabInternal(binder, parentTab);
}
}
use of org.zkoss.bind.annotation.Command in project collect by openforis.
the class SchemaVM method openDuplicateNodePopup.
@Command
public void openDuplicateNodePopup() {
if (!checkCanLeaveForm()) {
return;
}
SchemaNodeData selectedTreeNode = getSelectedTreeNode();
if (selectedTreeNode == null) {
return;
}
SurveyObject selectedItem = selectedTreeNode.getSurveyObject();
if (selectedItem instanceof NodeDefinition) {
openSelectParentNodePopupForDuplicate((NodeDefinition) selectedItem);
}
}
use of org.zkoss.bind.annotation.Command in project collect by openforis.
the class SchemaVM method versionSelected.
@Command
public void versionSelected(@BindingParam("version") Object version) {
ModelVersion modelVersion;
if (version == FormObject.VERSION_EMPTY_SELECTION) {
modelVersion = null;
} else {
modelVersion = (ModelVersion) version;
}
nodesTreeFilterChanged(selectedRootEntity, modelVersion);
}
Aggregations