Search in sources :

Example 6 with NotifyChange

use of org.zkoss.bind.annotation.NotifyChange 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 7 with NotifyChange

use of org.zkoss.bind.annotation.NotifyChange 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 8 with NotifyChange

use of org.zkoss.bind.annotation.NotifyChange 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)

Example 9 with NotifyChange

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

the class SurveyEditVM method languageCodeSelected.

@Command
@NotifyChange({ "currentLanguageCode" })
public void languageCodeSelected(@BindingParam("code") final String selectedLanguageCode) {
    final SessionStatus sessionStatus = getSessionStatus();
    checkCanLeaveForm(new CanLeaveFormConfirmHandler() {

        @Override
        public void onOk(boolean confirmed) {
            sessionStatus.setCurrentLanguageCode(selectedLanguageCode);
            BindUtils.postGlobalCommand(null, null, SurveyLanguageVM.CURRENT_LANGUAGE_CHANGED_COMMAND, null);
            currentLanguageCode = sessionStatus.getCurrentLanguageCode();
        }
    });
}
Also used : SessionStatus(org.openforis.collect.designer.session.SessionStatus) NotifyChange(org.zkoss.bind.annotation.NotifyChange) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand) Command(org.zkoss.bind.annotation.Command)

Example 10 with NotifyChange

use of org.zkoss.bind.annotation.NotifyChange 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);
    }
}
Also used : UITab(org.openforis.collect.metamodel.ui.UITab) NotifyChange(org.zkoss.bind.annotation.NotifyChange) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand) Command(org.zkoss.bind.annotation.Command)

Aggregations

Command (org.zkoss.bind.annotation.Command)26 NotifyChange (org.zkoss.bind.annotation.NotifyChange)26 GlobalCommand (org.zkoss.bind.annotation.GlobalCommand)17 UserCredential (es.bsc.compss.ui.auth.UserCredential)4 UIOptions (org.openforis.collect.metamodel.ui.UIOptions)4 File (java.io.File)3 IOException (java.io.IOException)3 MessageUtil (org.openforis.collect.designer.util.MessageUtil)3 UITab (org.openforis.collect.metamodel.ui.UITab)3 CollectSurvey (org.openforis.collect.model.CollectSurvey)3 UITab (org.openforis.collect.model.ui.UITab)3 Session (org.zkoss.zk.ui.Session)3 SimpleDateFormat (java.text.SimpleDateFormat)2 SessionStatus (org.openforis.collect.designer.session.SessionStatus)2 ConfirmParams (org.openforis.collect.designer.util.MessageUtil.ConfirmParams)2 UITabSet (org.openforis.collect.metamodel.ui.UITabSet)2 UITabDefinition (org.openforis.collect.model.ui.UITabDefinition)2 EmptyCompleteGraphException (es.bsc.compss.exceptions.EmptyCompleteGraphException)1 BufferedReader (java.io.BufferedReader)1 FileReader (java.io.FileReader)1