Class Checkbox.Builder

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

public static final class Checkbox.Builder extends Object
Checkbox Builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      @NonNull public @NonNull Checkbox.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 Checkbox Builder
    • id

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

      @NonNull public @NonNull Checkbox.Builder value(@NonNull @NonNull String value)
      Parameters:
      value - A string representing the value of the checkbox.
      Returns:
      the Builder
    • label

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

      @NonNull public @NonNull Checkbox.Builder checked(boolean checked)
      Parameters:
      checked - A boolean attribute indicating whether this checkbox is checked by default (when the page loads).
      Returns:
      The Checkbox Builder
    • disabled

      @NonNull public @NonNull Checkbox.Builder disabled(boolean disabled)
      Parameters:
      disabled - A boolean attribute indicating whether this checkbox is disabled by default (when the page loads).
      Returns:
      The Checkbox Builder
    • required

      @NonNull public @NonNull Checkbox.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 Checkbox Builder
    • build

      @NonNull public @NonNull Checkbox build()
      Instantiates a Checkbox.
      Returns:
      A Checkbox