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);
}
Aggregations