Search in sources :

Example 11 with Command

use of org.zkoss.bind.annotation.Command in project collect by openforis.

the class NumericAttributeVM method addPrecision.

@Command
@NotifyChange("precisions")
public void addPrecision() {
    editingNewPrecision = true;
    editedPrecision = new Precision();
    openPrecisionEditPopUp();
}
Also used : Precision(org.openforis.idm.metamodel.Precision) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand)

Example 12 with Command

use of org.zkoss.bind.annotation.Command in project collect by openforis.

the class SchemaLayoutVM method nodeSelected.

@Command
@NotifyChange({ "rootTabSet" })
public void nodeSelected(@BindingParam("node") Treeitem node) {
    List<ModelVersion> versions = survey.getVersions();
    setFormVersion(versions.isEmpty() ? null : versions.get(0));
    UITabSet tabSet = getRootTabSet(node);
    refreshTabSetLayoutPanel(tabSet, false);
    this.rootTabSet = tabSet;
    dispatchTabSetChangedCommand();
}
Also used : UITabSet(org.openforis.collect.metamodel.ui.UITabSet) ModelVersion(org.openforis.idm.metamodel.ModelVersion) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand)

Example 13 with Command

use of org.zkoss.bind.annotation.Command in project collect by openforis.

the class SurveyConfigurationEditVM method addTab.

@Command
@NotifyChange({ "newTab", "editedTabDefinition", "editedTab" })
public void addTab() {
    editedTabDefinition = null;
    editedTab = new UITab();
    newTab = true;
}
Also used : UITab(org.openforis.collect.model.ui.UITab) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command)

Example 14 with Command

use of org.zkoss.bind.annotation.Command in project collect by openforis.

the class SurveyConfigurationEditVM method addTabDefinition.

@Command
@NotifyChange({ "newTab", "editedTab", "editedTabDefinition" })
public void addTabDefinition() {
    editedTab = null;
    editedTabDefinition = new UITabDefinition();
    newTab = true;
}
Also used : UITabDefinition(org.openforis.collect.model.ui.UITabDefinition) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command)

Example 15 with Command

use of org.zkoss.bind.annotation.Command in project collect by openforis.

the class TabsGroupComposer method removeTab.

@Command
@NotifyChange({ "tabs" })
public void removeTab(@BindingParam("tab") UITab tab) {
    UITabsGroup parent = tab.getParent();
    parent.removeTab(tab);
}
Also used : UITabsGroup(org.openforis.collect.model.ui.UITabsGroup) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command)

Aggregations

Command (org.zkoss.bind.annotation.Command)62 GlobalCommand (org.zkoss.bind.annotation.GlobalCommand)44 NotifyChange (org.zkoss.bind.annotation.NotifyChange)26 File (java.io.File)12 CollectSurvey (org.openforis.collect.model.CollectSurvey)10 MessageUtil (org.openforis.collect.designer.util.MessageUtil)9 UITab (org.openforis.collect.metamodel.ui.UITab)6 EntityDefinition (org.openforis.idm.metamodel.EntityDefinition)6 FileInputStream (java.io.FileInputStream)5 ConfirmParams (org.openforis.collect.designer.util.MessageUtil.ConfirmParams)5 UIOptions (org.openforis.collect.metamodel.ui.UIOptions)5 SurveyObject (org.openforis.idm.metamodel.SurveyObject)5 Media (org.zkoss.util.media.Media)5 Window (org.zkoss.zul.Window)5 UserCredential (es.bsc.compss.ui.auth.UserCredential)4 IOException (java.io.IOException)4 Date (java.util.Date)4 NodeDefinition (org.openforis.idm.metamodel.NodeDefinition)4 SessionStatus (org.openforis.collect.designer.session.SessionStatus)3 ConfirmHandler (org.openforis.collect.designer.util.MessageUtil.ConfirmHandler)3