Class AbstractFieldDelegate<C extends com.vaadin.flow.component.AbstractField<?,V>,T,V>

Type Parameters:
C - component type
T - value source value type
V - component value type
All Implemented Interfaces:
ValueBindingDelegate<T>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
AbstractDateTimeFieldDelegate, AbstractNumberFieldDelegate, AbstractTextInputFieldDelegate, CollectionFieldDelegate, EntityCollectionFieldDelegate, EntityFieldDelegate, FieldDelegate, RichTextEditorDelegate, TextAreaFieldDelegate

public abstract class AbstractFieldDelegate<C extends com.vaadin.flow.component.AbstractField<?,V>,T,V> extends AbstractValueComponentDelegate<C,T,V> implements org.springframework.context.ApplicationContextAware
  • Field Details

    • PROPERTY_INVALID

      public static final String PROPERTY_INVALID
      See Also:
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • messages

      protected Messages messages
    • metadataTools

      protected MetadataTools metadataTools
    • uiComponentProperties

      protected UiComponentProperties uiComponentProperties
    • validators

      protected List<Validator<? super T>> validators
    • datatype

      protected Datatype<T> datatype
    • toModelConverter

      protected Function<V,T> toModelConverter
    • statusChangeHandler

      protected Consumer<SupportsStatusChangeHandler.StatusContext<C extends com.vaadin.flow.component.AbstractField<?,V>>> statusChangeHandler
    • errorMessage

      protected String errorMessage
    • requiredMessage

      protected String requiredMessage
    • explicitlyInvalid

      protected boolean explicitlyInvalid
    • conversionInvalid

      protected boolean conversionInvalid
  • Constructor Details

    • AbstractFieldDelegate

      public AbstractFieldDelegate(C component)
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setMessages

      @Autowired public void setMessages(Messages messages)
    • setMetadataTools

      @Autowired public void setMetadataTools(MetadataTools metadataTools)
    • setUiComponentProperties

      @Autowired public void setUiComponentProperties(UiComponentProperties uiComponentProperties)
    • setToModelConverter

      public void setToModelConverter(@Nullable Function<V,T> toModelConverter)
    • applyDefaultValueFormat

      public String applyDefaultValueFormat(@Nullable Object value)
    • addValidator

      public com.vaadin.flow.shared.Registration addValidator(Validator<? super T> validator)
    • executeValidators

      public void executeValidators() throws ValidationException
      Throws:
      ValidationException
    • getComponentValue

      @Nullable protected T getComponentValue()
    • getRequiredMessage

      @Nullable public String getRequiredMessage()
    • setRequiredMessage

      public void setRequiredMessage(@Nullable String requiredMessage)
    • getDatatype

      @Nullable public Datatype<T> getDatatype()
    • setDatatype

      public void setDatatype(@Nullable Datatype<T> datatype)
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
    • getErrorMessage

      @Nullable public String getErrorMessage()
    • setStatusChangeHandler

      public void setStatusChangeHandler(@Nullable Consumer<SupportsStatusChangeHandler.StatusContext<C>> statusChangeHandler)
    • isInvalid

      public boolean isInvalid()
    • setInvalid

      public void setInvalid(boolean invalid)
    • setConversionInvalid

      public void setConversionInvalid(boolean conversionInvalid)
    • updateInvalidState

      public void updateInvalidState()
    • isInvalidInternal

      protected boolean isInvalidInternal()
    • setInvalidInternal

      protected void setInvalidInternal(boolean invalid)
    • validatorsPassed

      protected boolean validatorsPassed()
    • setComponentRequiredErrorState

      protected void setComponentRequiredErrorState()
    • getRequiredErrorMessage

      protected String getRequiredErrorMessage()
    • getMessage

      protected String getMessage(String key)
    • formatMessage

      protected String formatMessage(String key, Object... params)
    • isEmptyAndRequired

      protected boolean isEmptyAndRequired()