Class ComboBoxField

    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • selectedExportValue

        private java.lang.String selectedExportValue
    • Constructor Detail

      • ComboBoxField

        public ComboBoxField​(java.lang.String id)
        Creates a new select field box.
        Parameters:
        id - the id
    • Method Detail

      • getSelectedExportValue

        public java.lang.String getSelectedExportValue()
        Gets the export value of the selected option.
        Returns:
        the export value of the selected option. This may be null if no value has been selected.
      • setSelected

        public ComboBoxField setSelected​(int index)
        Selects an option by its index. The index is zero-based.
        Parameters:
        index - the index of the option to select.
        Returns:
        this ComboBoxField instance.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index is out of bounds.
      • setSelected

        public ComboBoxField setSelected​(java.lang.String value)
        Selects an option by its export value.
        Parameters:
        value - the export value of the option to select.
        Returns:
        this ComboBoxField instance.
      • setSelected

        public ComboBoxField setSelected​(SelectFieldItem item)
        Selects an option by its value. This will use the export value of the option to match it to existing options.
        Parameters:
        item - the option to select.
        Returns:
        this ComboBoxField instance.
      • getSelectedOption

        public SelectFieldItem getSelectedOption()
        Gets the selected option.
        Returns:
        the selected option. This may be null if no option has been selected.
      • clearSelected

        private void clearSelected()