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:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
AbstractDateTimeFieldDelegate, CollectionFieldDelegate, EntityFieldDelegate, FieldDelegate, TextInputFieldDelegate

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
    • validators

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

      protected Datatype<T> datatype
    • toModelConverter

      protected Function<V,T> toModelConverter
    • requiredMessage

      protected String requiredMessage
    • explicitlyInvalid

      protected boolean explicitlyInvalid
  • 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)
    • setToModelConverter

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

      public String applyDefaultValueFormat(@Nullable V 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)
    • setComponentErrorMessage

      protected void setComponentErrorMessage(@Nullable String errorMessage)
    • getComponentErrorMessage

      @Nullable protected String getComponentErrorMessage()
    • isInvalid

      public boolean isInvalid()
    • setInvalid

      public void setInvalid(boolean invalid)
    • updateInvalidState

      protected 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)