Class WSingleSelect

    • Constructor Detail

      • WSingleSelect

        public WSingleSelect()
        Creates an empty WSingleSelect.
      • WSingleSelect

        public WSingleSelect​(Object[] options)
        Creates a WSingleSelect containing the specified options.
        Parameters:
        options - the options to display.
      • WSingleSelect

        public WSingleSelect​(List options)
        Creates a WSingleSelect containing the specified options.
        Parameters:
        options - the options to display.
      • WSingleSelect

        public WSingleSelect​(Object table)
        Creates a WSingleSelect with the options provided by the given table.
        Parameters:
        table - the table to obtain the list's options from.
    • Method Detail

      • setRows

        public void setRows​(int rows)
        Sets the maximum number of rows that are visible in the list at any one time. If the number of rows is less than two, then the default number of rows will be displayed.
        Parameters:
        rows - the number of rows to display.
      • getRows

        public int getRows()
        Returns:
        the number of rows to display in the list.
      • getAutocomplete

        public String getAutocomplete()
        Specified by:
        getAutocomplete in interface Autocompleteable
        Returns:
        the value of the autocomplete attribute applied to the current field.
      • addAutocompleteSection

        public void addAutocompleteSection​(String sectionName)
        Description copied from interface: Autocompleteable
        Pre-pend an autocomplete section to the value of an autocomplete attribute for the current field.
        Specified by:
        addAutocompleteSection in interface Autocompleteable
        Parameters:
        sectionName - the name of the section being the part which would replace the asterisk in the form section-*
      • setAutocomplete

        public void setAutocomplete​(DateType value)
        Description copied from interface: AutocompleteableDate
        Set the autocompletes attribute for a type of date input.
        Specified by:
        setAutocomplete in interface AutocompleteableDate
        Parameters:
        value - the type of date to auto-fill, currently only "bday" is supported.
      • setAutocomplete

        public void setAutocomplete​(Email value)
        Description copied from interface: AutocompleteableEmail
        Set the autocomplete attribute to a specific "email" value. Currently only value "email" is supported.
        Specified by:
        setAutocomplete in interface AutocompleteableEmail
        Parameters:
        value - the auto-fill hint value
      • setAutocomplete

        public void setAutocomplete​(Url value)
        Description copied from interface: AutocompleteableURL
        Set the autocomplete attribute to a specific URL auto-fill type: "url", "impp" or "photo".
        Specified by:
        setAutocomplete in interface AutocompleteableURL
        Parameters:
        value - the auto-fill hint value
      • setAutocomplete

        public void setAutocomplete​(Telephone phone,
                                    PhoneFormat phoneType)
        Description copied from interface: AutocompleteablePhone
        Set the autocomplete attribute to an appropriate value for a particular type of phone number, in either of a full or local format.
        Specified by:
        setAutocomplete in interface AutocompleteablePhone
        Parameters:
        phone - the telephone auto-fill variant, being full (including international prefix) or local (without international prefix)
        phoneType - the type of phone to which the number belongs, for example "mobile" or "fax"
      • setPhoneSegmentAutocomplete

        public void setPhoneSegmentAutocomplete​(PhoneFormat phoneType,
                                                PhonePart phoneSegment)
        Description copied from interface: AutocompleteableText
        Set the autocomplete attribute value relevant for a specified telephone number type and segment.
        Specified by:
        setPhoneSegmentAutocomplete in interface AutocompleteableText
        Parameters:
        phoneType - the type of phone number
        phoneSegment - the phone number segment
      • setAddressAutocomplete

        public void setAddressAutocomplete​(AddressType addressType,
                                           AddressPart addressPart)
        Description copied from interface: AutocompleteableText
        Set values for the autocomplete attribute applicable to an address or part thereof.
        Specified by:
        setAddressAutocomplete in interface AutocompleteableText
        Parameters:
        addressType - the type of address being auto-filled
        addressPart - the address segment for the field
      • getOrCreateComponentModel

        protected WSingleSelect.SingleSelectModel getOrCreateComponentModel()
        Description copied from class: AbstractWSelectList
        Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.
        Overrides:
        getOrCreateComponentModel in class AbstractWSelectList
        Returns:
        the model for this component