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 LayoutImpl
configureLayout
(LayoutImpl layout, String id, @Nullable String label, Layout.LayoutType layoutType, AbstractCompositeComponent parent) protected ColumnImpl
createColumn
(LayoutImpl layout, String path, String dataType) protected LayoutImpl
createDefaultBoxLayout
(FormImpl form, TextResources textResources) protected LayoutImpl
createDefaultTable
(FormImpl form) protected FieldSetImpl
createFieldSet
(LayoutImpl layout, String path, String dataType) protected FieldSetImpl
createFieldSet
(LayoutImpl layout, String id, String path, String dataType) protected FormImpl
createForm
(EntityModel model, FormScope scope) protected FieldSetImpl
createFulltextSearch
(LayoutImpl layout, String id, @Nullable String path) abstract Form
generateForm
(EntityModel model) protected boolean
isKeyOrAutoField
(FieldModel fieldModel) protected boolean
isRelevantRelation
(RelationModel relation)
-
Constructor Details
-
AbstractFormGenerator
-
-
Method Details
-
generateForm
- Throws:
ModelBuildException
-
createForm
-
createDefaultTable
-
createDefaultBoxLayout
-
configureLayout
protected LayoutImpl configureLayout(LayoutImpl layout, String id, @Nullable @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
protected FieldSetImpl createFulltextSearch(LayoutImpl layout, String id, @Nullable @Nullable String path) -
isRelevantRelation
- Parameters:
relation
- the relation model to check- Returns:
- true if the relation is relevant for generated forms, false otherwise
-
isKeyOrAutoField
-