Search in sources :

Example 1 with SurveyType

use of org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType in project collect by openforis.

the class SurveyExportParametersVM method isIncludeDataVisible.

@DependsOn({ "tempForm.type", "tempForm.outputFormat" })
public boolean isIncludeDataVisible() {
    SurveyType type = SurveyType.valueOf(getTypeFormField());
    OutputFormat outputFormat = OutputFormat.valueOf(getOutputFormatFormField());
    return type == PUBLISHED && outputFormat == RDB;
}
Also used : SurveyType(org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType) OutputFormat(org.openforis.collect.designer.viewmodel.SurveyExportParametersVM.SurveyExportParametersFormObject.OutputFormat) DependsOn(org.zkoss.bind.annotation.DependsOn)

Example 2 with SurveyType

use of org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType in project collect by openforis.

the class SurveyCloneParametersPopUpVM method init.

@Init
public void init(@ExecutionArgParam("originalSurvey") SurveySummary originalSurvey) {
    this.originalSurvey = originalSurvey;
    this.form = new HashMap<String, Object>();
    SurveyType originalSurveyType = originalSurvey.isTemporary() ? TEMPORARY : PUBLISHED;
    this.form.put("originalType", originalSurveyType.name());
    this.nameValidator = new SurveyNameValidator(surveyManager, SURVEY_NAME_FIELD, true);
}
Also used : SurveyType(org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType) SurveyNameValidator(org.openforis.collect.designer.form.validator.SurveyNameValidator) Init(org.zkoss.bind.annotation.Init)

Aggregations

SurveyType (org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType)2 SurveyNameValidator (org.openforis.collect.designer.form.validator.SurveyNameValidator)1 OutputFormat (org.openforis.collect.designer.viewmodel.SurveyExportParametersVM.SurveyExportParametersFormObject.OutputFormat)1 DependsOn (org.zkoss.bind.annotation.DependsOn)1 Init (org.zkoss.bind.annotation.Init)1