Search in sources :

Example 1 with SurveyNameValidator

use of org.openforis.collect.designer.form.validator.SurveyNameValidator in project collect by openforis.

the class NewSurveyParametersPopUpVM method init.

@Init(superclass = false)
public void init() {
    super.init();
    form = new HashMap<String, Object>();
    nameValidator = new SurveyNameValidator(surveyManager, SURVEY_NAME_FIELD, true);
    initLanguageModel();
    initTemplatesModel();
    initUserGroupsModel();
    form.put(USER_GROUP_FIELD_NAME, getDefaultPublicUserGroupItem());
}
Also used : SurveyNameValidator(org.openforis.collect.designer.form.validator.SurveyNameValidator) Init(org.zkoss.bind.annotation.Init)

Example 2 with SurveyNameValidator

use of org.openforis.collect.designer.form.validator.SurveyNameValidator 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

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