use of org.kie.workbench.common.forms.adf.service.definitions.layout.LayoutDefinition in project kie-wb-common by kiegroup.
the class AbstractFormGenerator method generateFormDefinition.
protected FormDefinition generateFormDefinition(FormDefinitionSettings settings, Object model, FormElementFilter... filters) {
FormGenerationContext context = new FormGenerationContext(model, settings, getI18nHelper(settings.getI18nSettings()), filters);
context.setFieldStatusModifierReferences(fieldModifierReferences);
context.setFieldStatusModifiers(fieldModifiers);
if (settings.getLayout() == null || settings.getLayout().getColumns() == null || settings.getLayout().getColumns().length == 0) {
settings.setLayout(new LayoutDefinition(new LayoutColumnDefinition()));
}
layoutGenerator.init(settings.getLayout().getColumns());
processElements(context);
FormDefinition form = context.getFormDefinition();
form.setLayoutTemplate(layoutGenerator.build());
return form;
}
Aggregations