Interface FormBuilder

All Known Implementing Classes:
BlockedFormBuilder, ColumnedFormBuilder, ComplexFormBuilder, DefaultFormBuilder, TabbedFormBuilder

public interface FormBuilder

Form builder class interface

By implementing this interface, only one method is used, in which the component, that will appear on the form, must be built. This built component can be any component, but it is recommended that a container type component is used. If the form us built using a custom builder class, then the Form component does not display the form item components automatically, those must be placed by the method implemented here. With this solution, any custom display type and format can be implemented

The method that is to be implemented receive the built form item components in a list, as its parameter. These components must be placed by the method, on the newly created component, so when the component returned by the method is displayed on the interface, the form item components will also be displayed, according to their placement in the returned component.

If any of the listed items are skipped/ignored, that is, they are not placed on the component, those will not be displayed on the interface for the user, but they will be in the Form. Thus, if a required, mandatory item is skipped/ignored, the form cannot be validated, since the user cannot fill out the required form item(s).

Since:
4.0
Author:
JBStrap
  • Method Summary

    Modifier and Type
    Method
    Description
    buildForm(List<FormItem<?,?>> formItems)
    Builds a form
  • Method Details

    • buildForm

      Component<?> buildForm(List<FormItem<?,?>> formItems)
      Builds a form
      Parameters:
      formItems - A list containing the form's form items. These components must be placed in the component, created by this method, that will be displayed on the form.
      Returns:
      The created component, that will be displayed by the form.