Class MultiValueSelectView.MultiValueSelectContext<E>

java.lang.Object
io.jmix.flowui.component.ComponentGenerationContext
io.jmix.flowui.app.multivaluepicker.MultiValueSelectView.MultiValueSelectContext<E>
Type Parameters:
E - the type of elements to be included in the multi-value select component
Enclosing interface:
MultiValueSelectView<E>

public static class MultiValueSelectView.MultiValueSelectContext<E> extends ComponentGenerationContext
Context class providing parameters required for generating multi-value select components. Extends ComponentGenerationContext to include additional features specific to multi-value selection scenarios.
  • Field Details

    • entityName

      protected String entityName
    • enumClass

      protected Class<? extends Enum<?>> enumClass
    • javaClass

      protected Class<?> javaClass
    • readOnly

      protected boolean readOnly
    • initialValues

      protected Collection<E> initialValues
    • lookupViewId

      protected String lookupViewId
    • useComboBox

      protected boolean useComboBox
    • valueExistsHandler

      protected Predicate<E> valueExistsHandler
    • addItemToLayoutHandler

      protected Consumer<E> addItemToLayoutHandler
    • entityPickerActionPerformedEventHandler

      protected Consumer<ActionPerformedEvent> entityPickerActionPerformedEventHandler
    • addValueInternalHandler

      protected Consumer<com.vaadin.flow.component.HasValue<?,E>> addValueInternalHandler
    • itemLabelGenerator

      protected com.vaadin.flow.component.ItemLabelGenerator<E> itemLabelGenerator
    • validators

      protected List<Validator<E>> validators
    • timeZone

      protected TimeZone timeZone
  • Constructor Details

    • MultiValueSelectContext

      public MultiValueSelectContext()
  • Method Details

    • getEntityName

      @Nullable public String getEntityName()
      Returns the entity name used in this context.
      Returns:
      the entity name or null if not set
    • setEntityName

      public void setEntityName(@Nullable String entityName)
      Sets the entity name for this context.
      Parameters:
      entityName - the entity name to set
    • getEnumClass

      @Nullable public Class<? extends Enum<?>> getEnumClass()
      Returns the enum class used in this context.
      Returns:
      the enum class or null if not set
    • setEnumClass

      public void setEnumClass(@Nullable Class<? extends Enum<?>> enumClass)
      Sets the enum class for this context.
      Parameters:
      enumClass - the enum class to set
    • getJavaClass

      @Nullable public Class<?> getJavaClass()
      Returns the value type class used in this context.
      Returns:
      the class or null if not set
    • setJavaClass

      public void setJavaClass(@Nullable Class<?> javaClass)
      Sets the value type class for this context.
      Parameters:
      javaClass - the class to set
    • isReadOnly

      public boolean isReadOnly()
      Returns whether this context is read-only.
      Returns:
      true if the context is read-only, false otherwise
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Sets the read-only state of this context.
      Parameters:
      readOnly - true to make the context read-only, false otherwise
    • getInitialValues

      public Collection<E> getInitialValues()
      Returns an unmodifiable collection of initial values.
      Returns:
      unmodifiable collection of initial values or empty list if no values are set
    • setInitialValues

      public void setInitialValues(@Nullable Collection<E> initialValues)
      Sets the initial values for this context.
      Parameters:
      initialValues - the collection of initial values to set
    • getLookupViewId

      public String getLookupViewId()
      Returns the lookup view identifier.
      Returns:
      the lookup view identifier
    • setLookupViewId

      public void setLookupViewId(String lookupViewId)
      Sets the lookup view identifier.
      Parameters:
      lookupViewId - the lookup view identifier to set
    • isUseComboBox

      public boolean isUseComboBox()
      Returns whether to use combo box for selection.
      Returns:
      true if combo box should be used, false otherwise
    • setUseComboBox

      public void setUseComboBox(boolean useComboBox)
      Sets whether to use combo box for selection.
      Parameters:
      useComboBox - true to use combo box, false otherwise
    • getItemLabelGenerator

      @Nullable public com.vaadin.flow.component.ItemLabelGenerator<E> getItemLabelGenerator()
      Returns the item label generator used for generating labels.
      Returns:
      the item label generator or null if not set
    • setItemLabelGenerator

      public void setItemLabelGenerator(@Nullable com.vaadin.flow.component.ItemLabelGenerator<E> itemLabelGenerator)
      Sets the item label generator for this context.
      Parameters:
      itemLabelGenerator - the item label generator to set
    • getValidators

      public List<Validator<E>> getValidators()
      Returns an unmodifiable list of validators.
      Returns:
      unmodifiable list of validators or empty list if no validators are set
    • setValidators

      public void setValidators(@Nullable List<Validator<E>> validators)
      Sets the list of validators for this context.
      Parameters:
      validators - the list of validators to set
    • addValidator

      public void addValidator(Validator<E> validator)
      Adds a validator to the list of validators.
      Parameters:
      validator - the validator to add
    • getTimeZone

      @Nullable public TimeZone getTimeZone()
      Returns the time zone used in this context.
      Returns:
      the time zone or null if not set
    • setTimeZone

      public void setTimeZone(@Nullable TimeZone timeZone)
      Sets the time zone for this context.
      Parameters:
      timeZone - the time zone to set
    • getValueExistsHandler

      public Predicate<E> getValueExistsHandler()
      Returns the handler that checks if a value exists.
      Returns:
      the value exists handler
    • setValueExistsHandler

      public void setValueExistsHandler(Predicate<E> valueExistsHandler)
      Sets the handler that checks if a value exists.
      Parameters:
      valueExistsHandler - the value exists handler to set
    • getAddItemToLayoutHandler

      public Consumer<E> getAddItemToLayoutHandler()
      Returns the handler that adds items to the layout.
      Returns:
      the add item to layout handler
    • setAddItemToLayoutHandler

      public void setAddItemToLayoutHandler(Consumer<E> addItemToLayoutHandler)
      Sets the handler that adds items to the layout.
      Parameters:
      addItemToLayoutHandler - the add item to layout handler to set
    • getEntityPickerActionPerformedEventHandler

      public Consumer<ActionPerformedEvent> getEntityPickerActionPerformedEventHandler()
      Returns the handler for entity picker action performed events.
      Returns:
      the entity picker action performed event handler
    • setEntityPickerActionPerformedEventHandler

      public void setEntityPickerActionPerformedEventHandler(Consumer<ActionPerformedEvent> entityPickerActionPerformedEventHandler)
      Sets the handler for entity picker action performed events.
      Parameters:
      entityPickerActionPerformedEventHandler - the entity picker action performed event handler to set
    • getAddValueInternalHandler

      public Consumer<com.vaadin.flow.component.HasValue<?,E>> getAddValueInternalHandler()
      Returns the handler that adds values internally.
      Returns:
      the add value internal handler
    • setAddValueInternalHandler

      public void setAddValueInternalHandler(Consumer<com.vaadin.flow.component.HasValue<?,E>> addValueInternalHandler)
      Sets the handler that adds values internally.
      Parameters:
      addValueInternalHandler - the add value internal handler to set