Class AbstractFormGenerator
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.reader.generator.AbstractFormGenerator
- Direct Known Subclasses:
DefaultDetailFormGenerator, DefaultListFormGenerator, DefaultSearchFormGenerator, LookupEntityDetailFormGenerator, LookupEntityListFormGenerator, LookupEntitySearchFormGenerator
Base class for default form generators which provides common functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutImplconfigureLayout(LayoutImpl layout, String id, @Nullable String label, Layout.LayoutType layoutType, AbstractCompositeComponent parent) protected ColumnImplcreateColumn(LayoutImpl layout, String path, String dataType) protected LayoutImplcreateDefaultBoxLayout(FormImpl form, TextResources textResources) protected LayoutImplcreateDefaultTable(FormImpl form) protected FieldSetImplcreateFieldSet(LayoutImpl layout, String path, String dataType) protected FieldSetImplcreateFieldSet(LayoutImpl layout, String id, String path, String dataType) protected FormImplcreateForm(EntityModel model, FormScope scope) protected FieldSetImplcreateFulltextSearch(LayoutImpl layout, String id, @Nullable String path) abstract FormgenerateForm(EntityModel model) protected booleanisKeyOrAutoField(FieldModel fieldModel) protected booleanisRelevantRelation(RelationModel relation)
-
Constructor Details
-
AbstractFormGenerator
-
-
Method Details
-
generateForm
- Throws:
ModelBuildException
-
createForm
-
createDefaultTable
-
createDefaultBoxLayout
-
configureLayout
protected LayoutImpl configureLayout(LayoutImpl layout, String id, @Nullable String label, Layout.LayoutType layoutType, AbstractCompositeComponent parent) -
createColumn
protected ColumnImpl createColumn(LayoutImpl layout, String path, String dataType) throws ModelBuildException - Throws:
ModelBuildException
-
createFieldSet
protected FieldSetImpl createFieldSet(LayoutImpl layout, String path, String dataType) throws ModelBuildException - Throws:
ModelBuildException
-
createFieldSet
protected FieldSetImpl createFieldSet(LayoutImpl layout, String id, String path, String dataType) throws ModelBuildException - Throws:
ModelBuildException
-
createFulltextSearch
-
isRelevantRelation
- Parameters:
relation- the relation model to check- Returns:
- true if the relation is relevant for generated forms, false otherwise
-
isKeyOrAutoField
-