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
- Direct Known Subclasses:
ReportsMultiValueSelectContext
- 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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Consumer<ActionPerformedEvent> protected Collection<E> protected com.vaadin.flow.component.ItemLabelGenerator<E> protected Class<?> protected Stringprotected booleanprotected TimeZoneprotected booleanFields inherited from class io.jmix.flowui.component.ComponentGenerationContext
collectionItems, enumItems, items, metaClass, property, targetClass, valueSource, xmlDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValidator(Validator<E> validator) Adds a validator to the list of validators.Returns the handler that adds items to the layout.Returns the handler that adds values internally.Returns the datatype used in this context.@Nullable StringReturns the entity name used in this context.Returns the handler for entity picker action performed events.Returns the enum class used in this context.Returns an unmodifiable collection of initial values.@Nullable com.vaadin.flow.component.ItemLabelGenerator<E> Returns the item label generator used for generating labels.@Nullable Class<?> Returns the value type class used in this context.Returns the lookup view identifier.@Nullable TimeZoneReturns the time zone used in this context.Returns an unmodifiable list of validators.Returns the handler that checks if a value exists.booleanReturns whether this context is read-only.booleanReturns whether to use combo box for selection.voidsetAddItemToLayoutHandler(Consumer<E> addItemToLayoutHandler) Sets the handler that adds items to the layout.voidsetAddValueInternalHandler(Consumer<com.vaadin.flow.component.HasValue<?, E>> addValueInternalHandler) Sets the handler that adds values internally.voidsetDatatype(@Nullable Datatype<E> datatype) Sets the datatype for this context.voidsetEntityName(@Nullable String entityName) Sets the entity name for this context.voidsetEntityPickerActionPerformedEventHandler(Consumer<ActionPerformedEvent> entityPickerActionPerformedEventHandler) Sets the handler for entity picker action performed events.voidsetEnumClass(@Nullable Class<? extends Enum<?>> enumClass) Sets the enum class for this context.voidsetInitialValues(@Nullable Collection<E> initialValues) Sets the initial values for this context.voidsetItemLabelGenerator(@Nullable com.vaadin.flow.component.ItemLabelGenerator<E> itemLabelGenerator) Sets the item label generator for this context.voidsetJavaClass(@Nullable Class<?> javaClass) Sets the value type class for this context.voidsetLookupViewId(String lookupViewId) Sets the lookup view identifier.voidsetReadOnly(boolean readOnly) Sets the read-only state of this context.voidsetTimeZone(@Nullable TimeZone timeZone) Sets the time zone for this context.voidsetUseComboBox(boolean useComboBox) Sets whether to use combo box for selection.voidsetValidators(@Nullable List<Validator<E>> validators) Sets the list of validators for this context.voidsetValueExistsHandler(Predicate<E> valueExistsHandler) Sets the handler that checks if a value exists.Methods inherited from class io.jmix.flowui.component.ComponentGenerationContext
getCollectionItems, getEnumItems, getItems, getMetaClass, getProperty, getTargetClass, getValueSource, getXmlDescriptor, setCollectionItems, setEnumItems, setItems, setTargetClass, setValueSource, setXmlDescriptor
-
Field Details
-
entityName
-
enumClass
-
javaClass
-
datatype
-
readOnly
protected boolean readOnly -
initialValues
-
lookupViewId
-
useComboBox
protected boolean useComboBox -
valueExistsHandler
-
addItemToLayoutHandler
-
entityPickerActionPerformedEventHandler
-
addValueInternalHandler
-
itemLabelGenerator
-
validators
-
timeZone
-
-
Constructor Details
-
MultiValueSelectContext
public MultiValueSelectContext()
-
-
Method Details
-
getEntityName
Returns the entity name used in this context.- Returns:
- the entity name or null if not set
-
setEntityName
Sets the entity name for this context.- Parameters:
entityName- the entity name to set
-
getEnumClass
Returns the enum class used in this context.- Returns:
- the enum class or null if not set
-
setEnumClass
Sets the enum class for this context.- Parameters:
enumClass- the enum class to set
-
getJavaClass
Returns the value type class used in this context.- Returns:
- the class or
nullif not set
-
setJavaClass
Sets the value type class for this context.- Parameters:
javaClass- the class to set
-
getDatatype
Returns the datatype used in this context.- Returns:
- the datatype or null if not set
-
setDatatype
Sets the datatype for this context.- Parameters:
datatype- the datatype 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
Returns an unmodifiable collection of initial values.- Returns:
- unmodifiable collection of initial values or empty list if no values are set
-
setInitialValues
Sets the initial values for this context.- Parameters:
initialValues- the collection of initial values to set
-
getLookupViewId
Returns the lookup view identifier.- Returns:
- the lookup view identifier
-
setLookupViewId
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
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
Returns an unmodifiable list of validators.- Returns:
- unmodifiable list of validators or empty list if no validators are set
-
setValidators
Sets the list of validators for this context.- Parameters:
validators- the list of validators to set
-
addValidator
Adds a validator to the list of validators.- Parameters:
validator- the validator to add
-
getTimeZone
Returns the time zone used in this context.- Returns:
- the time zone or null if not set
-
setTimeZone
Sets the time zone for this context.- Parameters:
timeZone- the time zone to set
-
getValueExistsHandler
Returns the handler that checks if a value exists.- Returns:
- the value exists handler
-
setValueExistsHandler
Sets the handler that checks if a value exists.- Parameters:
valueExistsHandler- the value exists handler to set
-
getAddItemToLayoutHandler
Returns the handler that adds items to the layout.- Returns:
- the add item to layout handler
-
setAddItemToLayoutHandler
Sets the handler that adds items to the layout.- Parameters:
addItemToLayoutHandler- the add item to layout handler to set
-
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
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
-