Class SelectFormElement.Builder

java.lang.Object
io.micronaut.views.fields.elements.SelectFormElement.Builder
Enclosing class:
SelectFormElement

public static final class SelectFormElement.Builder extends Object
Select Builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • required

      @NonNull public @NonNull SelectFormElement.Builder required(boolean required)
      Parameters:
      required - If true indicates that the user must specify a value for the input before the owning form can be submitted.
      Returns:
      The Builder
    • name

      @NonNull public @NonNull SelectFormElement.Builder name(@NonNull @NonNull String name)
      Parameters:
      name - Name of the form control. Submitted with the form as part of a name/value pair
      Returns:
      The Builder
    • id

      @NonNull public @NonNull SelectFormElement.Builder id(@Nullable @Nullable String id)
      Parameters:
      id - It defines an identifier (ID) which must be unique in the whole document
      Returns:
      The Builder
    • options

      @NonNull public @NonNull SelectFormElement.Builder options(List<Option> options)
      Parameters:
      options - select options
      Returns:
      the Builder
    • label

      @NonNull public @NonNull SelectFormElement.Builder label(Message label)
      Parameters:
      label - represents a caption for an item in a user interface
      Returns:
      The Builder
    • errors

      @NonNull public @NonNull SelectFormElement.Builder errors(@NonNull @NonNull List<Message> errors)
      Parameters:
      errors - Form element validation Errors.
      Returns:
      The Builder
    • build

      @NonNull public @NonNull SelectFormElement build()
      Creates a Select form element.
      Returns:
      A Select