Interface FormBuilder

All Superinterfaces:
LayoutContainerBuilder
All Known Implementing Classes:
FormBuilderImpl

public interface FormBuilder extends LayoutContainerBuilder
A builder to dynamically create Form instances.
  • 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()
    • hasImportAction

      boolean hasImportAction()
    • hasExportAction

      boolean hasExportAction()
    • hasGenericActions

      boolean hasGenericActions()
    • isMarkable

      boolean isMarkable()
    • markable

      FormBuilder markable(boolean markable)
    • readOnly

      FormBuilder readOnly(boolean readOnly)
    • getChildren

      List<Component> getChildren()
    • getLayoutBuilder

      @Nullable @Nullable LayoutBuilder getLayoutBuilder(Layout layout)
    • removeComponent

      void removeComponent(Component component)
    • addAction

      default ActionBuilder addAction(String id)
    • addAction

      ActionBuilder addAction(String id, @Nullable @Nullable String position)
    • addReport

      default ReportBuilder addReport(String id)
    • addReport

      ReportBuilder addReport(String id, @Nullable @Nullable String position)
    • addActionGroup

      default ActionGroupBuilder addActionGroup(String id, String label)
      add an action group with default position
      Parameters:
      id - id of the action group
      label - label of the action group
      Returns:
      the builder of the newly created action group
    • addActionGroup

      ActionGroupBuilder addActionGroup(String id, String label, @Nullable @Nullable String position)
      add a action group
      Parameters:
      id - id of the action group
      label - label of the action group
      position - relative position of the action group
      Returns:
      the builder of the newly created action group
    • getActionGroupBuilder

      @Nullable @Nullable ActionGroupBuilder getActionGroupBuilder(ActionGroup actionGroup)
      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

      void sort() throws ModelBuildException
      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
    • removeComponents

      void removeComponents(Predicate<Component> componentPredicate)
      remove all components (recursively) which returns the given predicate `true` for.
    • findById

      Optional<Component> findById(String componentId)
      looks for a child with the given id in the form (recursively).