use of org.openforis.collect.designer.session.SessionStatus in project collect by openforis.
the class SurveyLanguageVM method getSurveyAssignedLanguageCodes.
protected List<String> getSurveyAssignedLanguageCodes() {
SessionStatus sessionStatus = getSessionStatus();
CollectSurvey survey = sessionStatus.getSurvey();
if (survey == null) {
return null;
} else {
return survey.getLanguages();
}
}
use of org.openforis.collect.designer.session.SessionStatus in project collect by openforis.
the class SurveyLanguageVM method performLanguageUpdate.
private void performLanguageUpdate(CollectSurvey survey, List<String> newLanguageCodes) {
surveyManager.updateLanguages(survey, newLanguageCodes);
if (assignedLanguages.isEmpty()) {
MessageUtil.showWarning("survey.language.error.select_at_least_one_language");
} else {
SessionStatus sessionStatus = getSessionStatus();
sessionStatus.setCurrentLanguageCode(survey.getDefaultLanguage());
BindUtils.postGlobalCommand(null, null, SURVEY_LANGUAGES_CHANGED_COMMAND, null);
BindUtils.postGlobalCommand(null, null, CURRENT_LANGUAGE_CHANGED_COMMAND, null);
}
}
use of org.openforis.collect.designer.session.SessionStatus in project collect by openforis.
the class EditableListOfNodesVM method getLayoutFormVersion.
public ModelVersion getLayoutFormVersion() {
SessionStatus sessionStatus = getSessionStatus();
ModelVersion version = sessionStatus.getLayoutFormVersion();
return version;
}
use of org.openforis.collect.designer.session.SessionStatus in project collect by openforis.
the class EditableListOfNodesVM method getSurvey.
protected CollectSurvey getSurvey() {
SessionStatus sessionStatus = super.getSessionStatus();
CollectSurvey survey = sessionStatus.getSurvey();
return survey;
}
use of org.openforis.collect.designer.session.SessionStatus in project collect by openforis.
the class TabsGroupPanelVM method getSurvey.
protected CollectSurvey getSurvey() {
SessionStatus sessionStatus = super.getSessionStatus();
CollectSurvey survey = sessionStatus.getSurvey();
return survey;
}
Aggregations