Interface SelectField<F extends SelectField<F>>

All Superinterfaces:
Comparable<F>, Component<F>, Copyable<F>, Field<F>, FormComponent<F>, Serializable
All Known Subinterfaces:
DerivedSelectField<F>
All Known Implementing Classes:
DefaultDerivedSelectField, DefaultSelectField

public interface SelectField<F extends SelectField<F>> extends Field<F>
Represents the metadata for a select field within a form.
Author:
Nick Crum (ncrum)
  • Method Details

    • multi

      default F multi()
      Shorthand to set multi(boolean multi) to true.
      Returns:
      this
    • notMulti

      default F notMulti()
      Shorthand to set multi(boolean multi) to false.
      Returns:
      this
    • multi

      default F multi(boolean multi)
      Determines if the field is able to have multiple values. Set to true if it is able to contain multiple, otherwise false.
      Parameters:
      multi - the multi property
      Returns:
      this
    • searchable

      default F searchable()
      Shorthand to set searchable(boolean searchable) to true.
      Returns:
      this
    • notSearchable

      default F notSearchable()
      Shorthand to set searchable(boolean searchable) to false.
      Returns:
      this
    • searchable

      default F searchable(boolean searchable)
      Determines if the field is searchable. Set to true if it is searchable, otherwise false.
      Parameters:
      searchable - the searchable property
      Returns:
      this
    • labelKey

      default F labelKey(String labelKey)
      The key used to retrieve the labels of items in the select field.
      Parameters:
      labelKey - the label key property
      Returns:
      this
    • valueKey

      default F valueKey(String valueKey)
      The key used to retrieve the values of items in the select field.
      Parameters:
      valueKey - the value key property
      Returns:
      this
    • option

      default F option(String value, String label)
      Provides an option which can be selected by a select field.
      Parameters:
      value - the value of the option
      label - the label of the option
      Returns:
      this
    • option

      default F option(SelectOption... options)
      Provides options which can be selected by a select field.
      Parameters:
      options - SelectOptions to be set as options
      Returns:
      this
    • options

      default F options(Collection<SelectOption> optionsToAdd)
      Provides options which can be selected by a select field using a collection of SelectOptions.
      Parameters:
      optionsToAdd - A collection of SelectOptions
      Returns:
      this
    • clearOptions

      default F clearOptions()
      Removes all the options from the select field.
      Returns:
      this
    • getOptions

      default List<SelectOption> getOptions()