Search in sources :

Example 1 with DependsOn

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

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

the class SurveyLanguageVM method getUnassignedLanguages.

@DependsOn("assignedLanguages")
public List<LabelledItem> getUnassignedLanguages() {
    @SuppressWarnings("unchecked") List<LabelledItem> result = new ArrayList<LabelledItem>(org.apache.commons.collections.CollectionUtils.disjunction(languages, assignedLanguages));
    Collections.sort(result, new LabelledItem.LabelComparator());
    return result;
}
Also used : LabelledItem(org.openforis.collect.designer.model.LabelledItem) ArrayList(java.util.ArrayList) LabelComparator(org.openforis.collect.designer.model.LabelledItem.LabelComparator) DependsOn(org.zkoss.bind.annotation.DependsOn)

Example 3 with DependsOn

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

the class TaxonAttributeVM method getTaxonomyNames.

@DependsOn("surveyId")
public List<String> getTaxonomyNames() {
    List<CollectTaxonomy> taxonomies = speciesManager.loadTaxonomiesBySurvey(survey);
    List<String> result = new ArrayList<String>();
    for (CollectTaxonomy taxonomy : taxonomies) {
        result.add(taxonomy.getName());
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) CollectTaxonomy(org.openforis.collect.model.CollectTaxonomy) DependsOn(org.zkoss.bind.annotation.DependsOn)

Aggregations

DependsOn (org.zkoss.bind.annotation.DependsOn)3 ArrayList (java.util.ArrayList)2 LabelledItem (org.openforis.collect.designer.model.LabelledItem)1 LabelComparator (org.openforis.collect.designer.model.LabelledItem.LabelComparator)1 SurveyType (org.openforis.collect.designer.viewmodel.SurveyBaseVM.SurveyType)1 OutputFormat (org.openforis.collect.designer.viewmodel.SurveyExportParametersVM.SurveyExportParametersFormObject.OutputFormat)1 CollectTaxonomy (org.openforis.collect.model.CollectTaxonomy)1