Class ReportsMultiEntityPicker<E>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<ReportsMultiEntityPicker<E>,Collection<E>>
io.jmix.flowui.kit.component.valuepicker.ValuePickerBase<ReportsMultiEntityPicker<E>,Collection<E>>
io.jmix.reportsflowui.component.ReportsMultiEntityPicker<E>
Type Parameters:
E - entity type
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<ReportsMultiEntityPicker<E>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<ReportsMultiEntityPicker<E>>, com.vaadin.flow.component.FocusNotifier<ReportsMultiEntityPicker<E>>, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasPlaceholder, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ReportsMultiEntityPicker<E>,Collection<E>>,Collection<E>>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ReportsMultiEntityPicker<E>,Collection<E>>,Collection<E>>, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, EntityMultiPickerComponent<E>, EntityPickerComponent<Collection<E>>, HasRequired, PickerComponent<Collection<E>>, SupportsMetaClass, SupportsStatusChangeHandler<ReportsMultiEntityPicker<E>>, SupportsValidation<Collection<E>>, SupportsValueSource<Collection<E>>, HasActions, HasAutofocus, HasTitle, SupportsFormatter<Collection<E>>, SupportsUserAction<Collection<E>>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class ReportsMultiEntityPicker<E> extends ValuePickerBase<ReportsMultiEntityPicker<E>,Collection<E>> implements EntityMultiPickerComponent<E>, SupportsValidation<Collection<E>>, SupportsStatusChangeHandler<ReportsMultiEntityPicker<E>>, HasRequired, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
INTERNAL! Will be removed in next releases.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField

    com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>

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

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

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

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    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<?>>

    Nested classes/interfaces inherited from interface io.jmix.flowui.component.SupportsStatusChangeHandler

    SupportsStatusChangeHandler.StatusContext<C extends com.vaadin.flow.component.Component>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
     

    Fields inherited from class io.jmix.flowui.kit.component.valuepicker.ValuePickerBase

    actionsSupport, formatter, PROPERTY_ALLOW_CUSTOM_VALUE, PROPERTY_VALUE

    Fields inherited from interface io.jmix.flowui.kit.component.HasAutofocus

    AUTOFOCUS_PROPERTY_NAME

    Fields inherited from interface io.jmix.flowui.component.HasRequired

    PROPERTY_REQUIRED

    Fields inherited from interface io.jmix.flowui.component.SupportsValidation

    PROPERTY_ERROR_MESSAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValidator(Validator<? super Collection<E>> validator)
    Adds a validator to the list of validators for the component.
    void
     
    protected String
     
     
     
    void
    Executes all registered validators against the current value of the component.
    @Nullable MetaClass
    Returns the MetaClass associated with this component or entity.
    @Nullable String
    Returns the custom validation message to be displayed if the component is marked as required and the validation fails due to a missing value.
    Returns the current ValueSource associated with this component.
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
    setInvalid(boolean invalid)
    Sets invalid state to the field considering result of field validation.
    void
    setMetaClass(@Nullable MetaClass metaClass)
    Sets the MetaClass for this component or entity.
    void
    setRequiredMessage(@Nullable String requiredMessage)
    Sets a message that will be displayed or logged when a required field or input is not provided.
    void
    Sets a callback to be used to handle component status changes, e.g.
    void
    setValueSource(@Nullable ValueSource<Collection<E>> valueSource)
    Sets a ValueSource for this component, allowing it to bind its value to a specified data source.
    protected boolean
    valueEquals(@Nullable Collection<E> value1, @Nullable Collection<E> value2)
     

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

    addValueChangeListener, bindValue, getEmptyValue, getValue, isEmpty, setModelValue

    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.BlurNotifier

    addBlurListener

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

    addDetachListener

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

    addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndex

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

    addFocusListener

    Methods inherited from interface io.jmix.flowui.kit.component.HasActions

    addAction, addAction, getAction, getActions, removeAction, removeAction, removeAllActions

    Methods inherited from interface io.jmix.flowui.kit.component.HasAutofocus

    isAutofocus, setAutofocus

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

    getElement

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

    bindEnabled, isEnabled, setEnabled

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

    bindHelperText, getHelperComponent, getHelperText, setHelperComponent, setHelperText

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

    getLabel, setLabel

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

    bindPlaceholder, getPlaceholder, setPlaceholder

    Methods inherited from interface com.vaadin.flow.component.shared.HasPrefix

    getPrefixComponent, setPrefixComponent

    Methods inherited from interface io.jmix.flowui.component.HasRequired

    isRequired, setRequired

    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.shared.HasSuffix

    getSuffixComponent, setSuffixComponent

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

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

    Methods inherited from interface io.jmix.flowui.kit.component.HasTitle

    getTitle, setTitle

    Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip

    getTooltip, setTooltipMarkdown, setTooltipText

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

    setManualValidation

    Methods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties

    isInvalid

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

    clear, getOptionalValue

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

    bindReadOnly, bindRequiredIndicatorVisible, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible

    Methods inherited from interface io.jmix.flowui.kit.component.SupportsUserAction

    setValueFromClient

    Methods inherited from interface io.jmix.flowui.component.SupportsValidation

    getErrorMessage, setErrorMessage
  • Field Details

  • Constructor Details

    • ReportsMultiEntityPicker

      public ReportsMultiEntityPicker()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getValueSource

      public @Nullable ValueSource<Collection<E>> getValueSource()
      Description copied from interface: SupportsValueSource
      Returns the current ValueSource associated with this component.
      Specified by:
      getValueSource in interface SupportsValueSource<E>
      Returns:
      the associated ValueSource, or null if no value source is set
    • setValueSource

      public void setValueSource(@Nullable ValueSource<Collection<E>> valueSource)
      Description copied from interface: SupportsValueSource
      Sets a ValueSource for this component, allowing it to bind its value to a specified data source.
      Specified by:
      setValueSource in interface SupportsValueSource<E>
      Parameters:
      valueSource - the ValueSource to be associated with this component, or null to remove the current association
    • getMetaClass

      public @Nullable MetaClass getMetaClass()
      Description copied from interface: SupportsMetaClass
      Returns the MetaClass associated with this component or entity.
      Specified by:
      getMetaClass in interface SupportsMetaClass
      Returns:
      the MetaClass object, or null if no MetaClass is associated
    • setMetaClass

      public void setMetaClass(@Nullable MetaClass metaClass)
      Description copied from interface: SupportsMetaClass
      Sets the MetaClass for this component or entity.
      Specified by:
      setMetaClass in interface SupportsMetaClass
      Parameters:
      metaClass - the MetaClass to associate with this component or entity, or null to disassociate any currently set MetaClass
    • addValidator

      public com.vaadin.flow.shared.Registration addValidator(Validator<? super Collection<E>> validator)
      Description copied from interface: SupportsValidation
      Adds a validator to the list of validators for the component. The provided validator will be used to validate the value of the component during validation execution.
      Specified by:
      addValidator in interface SupportsValidation<E>
      Parameters:
      validator - the validator to be added; should not be null
      Returns:
      a Registration object that allows removing the added validator
    • executeValidators

      public void executeValidators() throws ValidationException
      Description copied from interface: SupportsValidation
      Executes all registered validators against the current value of the component. If any of the validators fail, a ValidationException is thrown to indicate the failure. The exact behavior and order of validation depend on the validators added.
      Specified by:
      executeValidators in interface SupportsValidation<E>
      Throws:
      ValidationException - if validation fails for one or more validators
    • setInvalid

      public void setInvalid(boolean invalid)
      Description copied from interface: SupportsValidation
      Sets invalid state to the field considering result of field validation.
      • Invalid - false and validation passed - false = field is invalid
      • Invalid - false and validation passed - true = field is valid
      • Invalid - true and validation passed - false = field is invalid
      • Invalid - true and validation passed - true = field is invalid
      Specified by:
      setInvalid in interface com.vaadin.flow.component.HasValidation
      Specified by:
      setInvalid in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      setInvalid in interface SupportsValidation<E>
      Parameters:
      invalid - whether field should be invalid
    • setStatusChangeHandler

      public void setStatusChangeHandler(@Nullable Consumer<SupportsStatusChangeHandler.StatusContext<ReportsMultiEntityPicker<E>>> handler)
      Description copied from interface: SupportsStatusChangeHandler
      Sets a callback to be used to handle component status changes, e.g. validation messages set by HasValidation.setErrorMessage(String).
      Specified by:
      setStatusChangeHandler in interface SupportsStatusChangeHandler<E>
      Parameters:
      handler - a handler to set
    • getRequiredMessage

      public @Nullable String getRequiredMessage()
      Description copied from interface: HasRequired
      Returns the custom validation message to be displayed if the component is marked as required and the validation fails due to a missing value.
      Specified by:
      getRequiredMessage in interface HasRequired
      Returns:
      the required message set for the component, or null if no message is defined
    • setRequiredMessage

      public void setRequiredMessage(@Nullable String requiredMessage)
      Description copied from interface: HasRequired
      Sets a message that will be displayed or logged when a required field or input is not provided.
      Specified by:
      setRequiredMessage in interface HasRequired
      Parameters:
      requiredMessage - the message to be set for required fields. If null, the default message or no message will be used.
    • applyDefaultValueFormat

      protected String applyDefaultValueFormat(@Nullable Collection<E> value)
      Overrides:
      applyDefaultValueFormat in class ValuePickerBase<ReportsMultiEntityPicker<E>,Collection<E>>
    • valueEquals

      protected boolean valueEquals(@Nullable Collection<E> value1, @Nullable Collection<E> value2)
      Overrides:
      valueEquals in class com.vaadin.flow.component.AbstractField<ReportsMultiEntityPicker<E>,Collection<E>>
    • createActionsSupport

      protected ValuePickerActionSupport createActionsSupport()
      Overrides:
      createActionsSupport in class ValuePickerBase<ReportsMultiEntityPicker<E>,Collection<E>>
    • createFieldDelegate

      protected ReportsEntityPickerDelegate<ReportsMultiEntityPicker<E>,E> createFieldDelegate()