Interface FormBuilder
- All Superinterfaces:
LayoutContainerBuilder
- All Known Implementing Classes:
FormBuilderImpl
A builder to dynamically create
Form
instances.-
Method Summary
Modifier and TypeMethodDescriptiondefault ActionBuilder
default ActionGroupBuilder
addActionGroup
(String id, String label) add an action group with default positionaddActionGroup
(String id, String label, @Nullable String position) add a action groupdefault ReportBuilder
looks for a child with the given id in the form (recursively).get()
returns the form component.@Nullable ActionGroupBuilder
getActionGroupBuilder
(ActionGroup actionGroup) get a builder for a given ActionGroup@Nullable LayoutBuilder
getLayoutBuilder
(Layout layout) get or create the main action bar at the top of the form that contains the major action groups and actions.returns the form component as opposed toget()
, this does not validate or process the contents of the form do not use the result of this method as a final form, but only as a carrier for form databoolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
markable
(boolean markable) readOnly
(boolean readOnly) void
removeComponent
(Component component) void
removeComponents
(Predicate<Component> componentPredicate) remove all components (recursively) which returns the given predicate `true` for.void
sort()
sort the component represented by this builderMethods inherited from interface ch.tocco.nice2.model.form.api.form2.builder.LayoutContainerBuilder
addLayout, addLayout, addTable, addTable
-
Method Details
-
getFormId
String getFormId() -
getEntityModel
EntityModel getEntityModel() -
isReplaced
boolean isReplaced() -
isReadOnly
boolean isReadOnly() -
isAppendDefaultActions
boolean isAppendDefaultActions() -
isAppendMassMutationActions
boolean isAppendMassMutationActions() -
hasOutputJobAction
boolean hasOutputJobAction() -
hasMergeAction
boolean hasMergeAction() -
hasGenericLabelAction
boolean hasGenericLabelAction() -
hasCopyAction
boolean hasCopyAction() -
hasImportAction
boolean hasImportAction() -
hasExportAction
boolean hasExportAction() -
hasGenericActions
boolean hasGenericActions() -
isMarkable
boolean isMarkable() -
markable
-
readOnly
-
getChildren
-
getLayoutBuilder
-
removeComponent
-
addAction
-
addAction
-
addReport
-
addReport
-
addActionGroup
add an action group with default position- Parameters:
id
- id of the action grouplabel
- label of the action group- Returns:
- the builder of the newly created action group
-
addActionGroup
add a action group- Parameters:
id
- id of the action grouplabel
- label of the action groupposition
- relative position of the action group- Returns:
- the builder of the newly created action group
-
getActionGroupBuilder
get a builder for a given ActionGroup- Parameters:
actionGroup
- the action group to use- Returns:
- the builder
-
getOrCreateMainActionBar
ActionBar getOrCreateMainActionBar()get or create the main action bar at the top of the form that contains the major action groups and actions.- Returns:
- the existing main action bar or the newly created one.
-
sort
sort the component represented by this builder- Throws:
ModelBuildException
-
get
returns the form component. note: for performance reasons this method should be called only once at the end when the form is built completely, because it also validates all components and does some other final modifications.- Returns:
- the form component
- Throws:
ModelBuildException
-
getWithoutProcessing
Form getWithoutProcessing()returns the form component as opposed toget()
, this does not validate or process the contents of the form do not use the result of this method as a final form, but only as a carrier for form data- Returns:
- the form component
-
removeComponents
remove all components (recursively) which returns the given predicate `true` for. -
findById
looks for a child with the given id in the form (recursively).
-