Class ComboBox

    • Field Detail

      • pageLength

        protected int pageLength
        Deprecated.
        Holds value of property pageLength. 0 disables paging.
    • Constructor Detail

      • ComboBox

        public ComboBox()
        Deprecated.
      • ComboBox

        public ComboBox​(String caption,
                        Collection<?> options)
        Deprecated.
      • ComboBox

        public ComboBox​(String caption,
                        Container dataSource)
        Deprecated.
      • ComboBox

        public ComboBox​(String caption)
        Deprecated.
    • Method Detail

      • getInputPrompt

        public String getInputPrompt()
        Deprecated.
        Gets the current input prompt.
        Returns:
        the current input prompt, or null if not enabled
        See Also:
        setInputPrompt(String)
      • setInputPrompt

        public void setInputPrompt​(String inputPrompt)
        Deprecated.
        Sets the input prompt - a textual prompt that is displayed when the select would otherwise be empty, to prompt the user for input.
        Parameters:
        inputPrompt - the desired input prompt, or null to disable
      • setTextInputAllowed

        public void setTextInputAllowed​(boolean textInputAllowed)
        Deprecated.
        Sets whether it is possible to input text into the field or whether the field area of the component is just used to show what is selected. By disabling text input, the comboBox will work in the same way as a NativeSelect
        Parameters:
        textInputAllowed - true to allow entering text, false to just show the current selection
        See Also:
        isTextInputAllowed()
      • isTextInputAllowed

        public boolean isTextInputAllowed()
        Deprecated.
        Returns true if the user can enter text into the field to either filter the selections or enter a new value if AbstractSelect.isNewItemsAllowed() returns true. If text input is disabled, the comboBox will work in the same way as a NativeSelect
        Returns:
      • getOptionsWithFilter

        protected List<?> getOptionsWithFilter​(boolean needNullSelectOption)
        Deprecated.
        Returns the filtered options for the current page using a container filter. As a size effect, filteredSize is set to the total number of items passing the filter. The current container must be Container.Filterable and Container.Indexed, and the filtering mode must be suitable for container filtering. Use getFilteredOptions() and sanitizeList(List, boolean) if this is not the case.
        Parameters:
        needNullSelectOption -
        Returns:
        filtered list of options (may be empty) or null if cannot use container filters
      • buildFilter

        protected Container.Filter buildFilter​(String filterString,
                                               FilteringMode filteringMode)
        Deprecated.
        Constructs a filter instance to use when using a Filterable container in the ITEM_CAPTION_MODE_PROPERTY mode. Note that the client side implementation expects the filter string to apply to the item caption string it sees, so changing the behavior of this method can cause problems.
        Parameters:
        filterString -
        filteringMode -
        Returns:
      • getFilteredOptions

        protected List<?> getFilteredOptions()
        Deprecated.
        Filters the options in memory and returns the full filtered list. This can be less efficient than using container filters, so use getOptionsWithFilter(boolean) if possible (filterable container and suitable item caption mode etc.).
        Returns:
      • getPageLength

        public int getPageLength()
        Deprecated.
        Returns the page length of the suggestion popup.
        Returns:
        the pageLength
      • setPageLength

        public void setPageLength​(int pageLength)
        Deprecated.
        Sets the page length for the suggestion popup. Setting the page length to 0 will disable suggestion popup paging (all items visible).
        Parameters:
        pageLength - the pageLength to set
      • setPopupWidth

        public void setPopupWidth​(String width)
        Deprecated.
        Sets the suggestion pop-up's width as a CSS string. By using relative units (e.g. "50%") it's possible to set the popup's width relative to the ComboBox itself.
        Parameters:
        width - the width
        Since:
        7.7
        See Also:
        getPopupWidth()
      • setScrollToSelectedItem

        public void setScrollToSelectedItem​(boolean scrollToSelectedItem)
        Deprecated.
        Sets whether to scroll the selected item visible (directly open the page on which it is) when opening the combo box popup or not. Only applies to single select mode. This requires finding the index of the item, which can be expensive in many large lazy loading containers.
        Parameters:
        scrollToSelectedItem - true to find the page with the selected item when opening the selection popup
      • isScrollToSelectedItem

        public boolean isScrollToSelectedItem()
        Deprecated.
        Returns true if the select should find the page with the selected item when opening the popup (single select combo box only).
        Returns:
        true if the page with the selected item will be shown when opening the popup
        See Also:
        setScrollToSelectedItem(boolean)
      • setItemStyleGenerator

        public void setItemStyleGenerator​(ComboBox.ItemStyleGenerator itemStyleGenerator)
        Deprecated.
        Sets the item style generator that is used to produce custom styles for showing items in the popup. The CSS class name that will be added to the item style names is v-filterselect-item-[style name].
        Parameters:
        itemStyleGenerator - the item style generator to set, or null to not use any custom item styles
        Since:
        7.5.6
      • getItemStyleGenerator

        public ComboBox.ItemStyleGenerator getItemStyleGenerator()
        Deprecated.
        Gets the currently used item style generator.
        Returns:
        the itemStyleGenerator the currently used item style generator, or null if no generator is used
        Since:
        7.5.6