Class CustomFilterMultiSelectLookupField<T,FilterType>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.vaadin.componentfactory.lookupfield.AbstractLookupField<T,Set<T>,com.vaadin.flow.component.combobox.MultiSelectComboBox<T>,CustomFilterMultiSelectLookupField<T,FilterType>,FilterType>
com.vaadin.componentfactory.lookupfield.CustomFilterMultiSelectLookupField<T,FilterType>
Type Parameters:
T - the type of the items to be inserted in the combo box
FilterType - the type of the filter used to query the data provider
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<CustomFilterMultiSelectLookupField<T,FilterType>,Set<T>>,Set<T>>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<CustomFilterMultiSelectLookupField<T,FilterType>,Set<T>>,Set<T>>, com.vaadin.flow.data.binder.HasFilterableDataProvider<T,FilterType>, com.vaadin.flow.data.binder.HasItems<T>, Serializable
Direct Known Subclasses:
MultiSelectLookupField

public class CustomFilterMultiSelectLookupField<T,FilterType> extends AbstractLookupField<T,Set<T>,com.vaadin.flow.component.combobox.MultiSelectComboBox<T>,CustomFilterMultiSelectLookupField<T,FilterType>,FilterType>
Server-side component for the vcf-lookup-field webcomponent. The LookupField is a combination of a combobox and a dialog for advanced search.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.componentfactory.lookupfield.AbstractLookupField

    AbstractLookupField.CreateItemEvent, AbstractLookupField.FilterEvent<FILTERTYPE>, AbstractLookupField.LookupFieldI18n

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
  • Field Summary

    Fields inherited from class com.vaadin.componentfactory.lookupfield.AbstractLookupField

    comboBox, DEFAULT_EMPTY_SELECTION, FIELD_SLOT_NAME, filterConverter, invertedFilterConverter, SLOT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomFilterMultiSelectLookupField(com.vaadin.flow.component.grid.Grid<T> grid, com.vaadin.flow.component.combobox.MultiSelectComboBox<T> comboBox, com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
    Constructor.
    CustomFilterMultiSelectLookupField(com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
    Constructor The converters are used to convert the backend filter to the combobox filter (String) or if you are using setItems
    CustomFilterMultiSelectLookupField(Class<T> beanType, com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<CustomFilterMultiSelectLookupField<T,FilterType>,Set<T>>> listener)
     
    protected void
    Copy the selected value of the grid into the field
    protected void
    Copy the selected value of the field into the grid
    com.vaadin.flow.component.combobox.MultiSelectComboBox<T>
    Gets the internal combo box used as the field.
     
    void
    setComboBox(com.vaadin.flow.component.combobox.MultiSelectComboBox<T> comboBox)
    Set the comboBox
    void
    setDataProvider(com.vaadin.flow.component.combobox.ComboBox.ItemFilter<T> itemFilter, com.vaadin.flow.data.provider.ListDataProvider<T> listDataProvider)
    Sets a list data provider with an item filter as the data provider.
    void
    setDataProvider(com.vaadin.flow.data.provider.ListDataProvider<T> listDataProvider)
    Sets a list data provider as the data provider.
    void
    setGrid(com.vaadin.flow.component.grid.Grid<T> grid)
    Set the grid
    void
    setItemLabelGenerator(com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator)
    Sets the item label generator that is used to produce the strings shown in the combo box for each item.
    void
    Set the label of the field
    void
    setValue(Set<T> value)
     
    void
    showSelectedItems(boolean showSelectedItems)
    Controls whether a label showing the number of selected items is displayed in the dialog.

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replace

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled

    Methods inherited from interface com.vaadin.flow.data.binder.HasFilterableDataProvider

    setDataProvider

    Methods inherited from interface com.vaadin.flow.data.binder.HasItems

    setItems, setItems

    Methods inherited from interface com.vaadin.flow.component.HasSize

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    bindText, getText, getWhiteSpace, setText, setWhiteSpace

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.HasValidation

    setManualValidation

    Methods inherited from interface com.vaadin.flow.component.HasValue

    bindValue, clear, getEmptyValue, getOptionalValue, isEmpty

    Methods inherited from interface com.vaadin.flow.component.HasValueAndElement

    bindReadOnly, bindRequiredIndicatorVisible, isReadOnly, isRequiredIndicatorVisible
  • Constructor Details

    • CustomFilterMultiSelectLookupField

      public CustomFilterMultiSelectLookupField(com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
      Constructor The converters are used to convert the backend filter to the combobox filter (String) or if you are using setItems
      Parameters:
      filterConverter - Convert a string to FilterType
      invertedFilterConverter - Convert a FilterType to String
    • CustomFilterMultiSelectLookupField

      public CustomFilterMultiSelectLookupField(Class<T> beanType, com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
      Constructor. The converters are used to convert the backend filter to the combobox filter (String) or if you are using setItems.
      Parameters:
      beanType - the bean type used to configure the grid columns
      filterConverter - Convert a string to FilterType
      invertedFilterConverter - Convert a FilterType to String
    • CustomFilterMultiSelectLookupField

      public CustomFilterMultiSelectLookupField(com.vaadin.flow.component.grid.Grid<T> grid, com.vaadin.flow.component.combobox.MultiSelectComboBox<T> comboBox, com.vaadin.flow.function.SerializableFunction<String,FilterType> filterConverter, com.vaadin.flow.function.SerializableFunction<FilterType,String> invertedFilterConverter)
      Constructor. The converters are used to convert the backend filter to the combobox filter (String) or if you are using setItems.
      Parameters:
      grid - the grid to use
      comboBox - the multi-select combo box to use
      filterConverter - Convert a string to FilterType
      invertedFilterConverter - Convert a FilterType to String
  • Method Details