Search in sources :

Example 1 with Orientation

use of org.openforis.collect.metamodel.ui.UIOptions.Orientation in project collect by openforis.

the class CodeAttributeDefinitionFormObject method loadFrom.

@Override
public void loadFrom(CodeAttributeDefinition source, String languageCode) {
    super.loadFrom(source, languageCode);
    list = source.getList();
    setParentCodeAttributeDefinition(source.getParentCodeAttributeDefinition());
    hierarchicalLevel = extractHierarchicalLevel(source);
    strict = !source.isAllowUnlisted();
    allowValuesSorting = source.isMultiple() && source.isAllowValuesSorting();
    CollectSurvey survey = (CollectSurvey) source.getSurvey();
    UIOptions uiOptions = survey.getUIOptions();
    showAllowedValuesPreview = uiOptions.getShowAllowedValuesPreviewValue(source);
    layoutType = uiOptions.getLayoutType(source).name();
    Orientation sourceItemsDirection = uiOptions.getLayoutDirection(source);
    layoutDirection = sourceItemsDirection == null ? null : sourceItemsDirection.name();
    showCode = uiOptions.getShowCode(source);
}
Also used : UIOptions(org.openforis.collect.metamodel.ui.UIOptions) CollectSurvey(org.openforis.collect.model.CollectSurvey) Orientation(org.openforis.collect.metamodel.ui.UIOptions.Orientation)

Aggregations

UIOptions (org.openforis.collect.metamodel.ui.UIOptions)1 Orientation (org.openforis.collect.metamodel.ui.UIOptions.Orientation)1 CollectSurvey (org.openforis.collect.model.CollectSurvey)1