Search in sources :

Example 1 with BindingListModelList

use of org.zkoss.zkplus.databind.BindingListModelList in project collect by openforis.

the class SurveyBaseVM method getCodeLists.

public List<CodeList> getCodeLists() {
    CollectSurvey survey = getSurvey();
    boolean includeSamplingDesignList = survey.getTarget() != SurveyTarget.COLLECT_EARTH;
    List<CodeList> result = new ArrayList<CodeList>(survey.getCodeLists(includeSamplingDesignList));
    result = sort(result);
    return new BindingListModelList<CodeList>(result, false);
}
Also used : CodeList(org.openforis.idm.metamodel.CodeList) ArrayList(java.util.ArrayList) CollectSurvey(org.openforis.collect.model.CollectSurvey) BindingListModelList(org.zkoss.zkplus.databind.BindingListModelList)

Example 2 with BindingListModelList

use of org.zkoss.zkplus.databind.BindingListModelList in project collect by openforis.

the class SurveyBaseVM method getFormVersionIdsWithEmptyOption.

public List<Integer> getFormVersionIdsWithEmptyOption() {
    List<ModelVersion> versions = getSurveyFormVersions();
    List<Integer> result = new ArrayList<Integer>();
    result.add(0, -1);
    for (ModelVersion modelVersion : versions) {
        result.add(modelVersion.getId());
    }
    return new BindingListModelList<Integer>(result, false);
}
Also used : ArrayList(java.util.ArrayList) ModelVersion(org.openforis.idm.metamodel.ModelVersion) BindingListModelList(org.zkoss.zkplus.databind.BindingListModelList)

Example 3 with BindingListModelList

use of org.zkoss.zkplus.databind.BindingListModelList in project collect by openforis.

the class SchemaLayoutVM method getFormVersions.

public List<ModelVersion> getFormVersions() {
    CollectSurvey survey = getSurvey();
    List<ModelVersion> result = new ArrayList<ModelVersion>(survey.getVersions());
    return new BindingListModelList<ModelVersion>(result, false);
}
Also used : ArrayList(java.util.ArrayList) ModelVersion(org.openforis.idm.metamodel.ModelVersion) CollectSurvey(org.openforis.collect.model.CollectSurvey) BindingListModelList(org.zkoss.zkplus.databind.BindingListModelList)

Aggregations

ArrayList (java.util.ArrayList)3 BindingListModelList (org.zkoss.zkplus.databind.BindingListModelList)3 CollectSurvey (org.openforis.collect.model.CollectSurvey)2 ModelVersion (org.openforis.idm.metamodel.ModelVersion)2 CodeList (org.openforis.idm.metamodel.CodeList)1