use of org.openforis.collect.metamodel.ui.UIOptions.Direction in project collect by openforis.
the class EntityDefinitionFormObject method saveTo.
@Override
public void saveTo(T dest, String languageCode) {
super.saveTo(dest, languageCode);
dest.setVirtual(virtual);
dest.setGeneratorExpression(virtual ? generatorExpression : null);
CollectSurvey survey = (CollectSurvey) dest.getSurvey();
dest.setEnumerate(survey.getTarget() == SurveyTarget.COLLECT_EARTH || enumerate);
UIOptions uiOptions = getUIOptions(dest);
Layout layout = Layout.valueOf(layoutType);
uiOptions.setLayout(dest, layout);
uiOptions.setCountInSummaryListValue(dest, countInRecordSummary);
uiOptions.setShowRowNumbersValue(dest, showRowNumbers);
Direction directionEnum = super.isMultiple() && layout == Layout.TABLE && Direction.BY_COLUMNS.getValue().equals(this.direction) ? Direction.BY_COLUMNS : null;
direction = directionEnum == null ? null : directionEnum.getValue();
uiOptions.setDirection(dest, directionEnum);
}
use of org.openforis.collect.metamodel.ui.UIOptions.Direction in project collect by openforis.
the class EntityDefinitionProxy method getDirection.
@ExternalizedProperty
public Direction getDirection() {
CollectSurvey survey = (CollectSurvey) entityDefinition.getSurvey();
UIOptions uiOpts = survey.getUIOptions();
Direction result = uiOpts.getDirection(entityDefinition);
return result;
}
Aggregations