Class AbstractValueBinding<V>

java.lang.Object
io.jmix.flowui.data.binding.impl.AbstractValueBinding<V>
All Implemented Interfaces:
JmixBinding, SuspendableBinding, ValueBinding<V>
Direct Known Subclasses:
FieldValueBinding

public abstract class AbstractValueBinding<V> extends Object implements ValueBinding<V>, SuspendableBinding
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • messageTools

      protected MessageTools messageTools
    • metadataTools

      protected MetadataTools metadataTools
    • validator

      protected javax.validation.Validator validator
    • accessManager

      protected AccessManager accessManager
    • valueSource

      protected ValueSource<V> valueSource
    • component

      protected com.vaadin.flow.component.HasValue<?,V> component
    • componentValueChangeRegistration

      protected com.vaadin.flow.shared.Registration componentValueChangeRegistration
    • valueSourceValueChangeRegistration

      protected com.vaadin.flow.shared.Registration valueSourceValueChangeRegistration
    • valueSourceStateChangeRegistration

      protected com.vaadin.flow.shared.Registration valueSourceStateChangeRegistration
    • valueSourceInstanceChangeRegistration

      protected com.vaadin.flow.shared.Registration valueSourceInstanceChangeRegistration
    • suspended

      protected boolean suspended
  • Constructor Details

    • AbstractValueBinding

      public AbstractValueBinding(ValueSource<V> valueSource, com.vaadin.flow.component.HasValue<?,V> component)
  • Method Details

    • setApplicationContext

      @Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
    • setMessageTools

      @Autowired public void setMessageTools(MessageTools messageTools)
    • setMetadataTools

      @Autowired public void setMetadataTools(MetadataTools metadataTools)
    • setValidator

      @Autowired public void setValidator(javax.validation.Validator validator)
    • setAccessManager

      @Autowired public void setAccessManager(AccessManager accessManager)
    • getValueSource

      public ValueSource<V> getValueSource()
      Specified by:
      getValueSource in interface ValueBinding<V>
    • getComponent

      public com.vaadin.flow.component.HasValue<?,V> getComponent()
      Specified by:
      getComponent in interface ValueBinding<V>
    • bind

      public void bind()
      Specified by:
      bind in interface JmixBinding
    • onValueSourceInstanceChanged

      protected void onValueSourceInstanceChanged(EntityValueSource.InstanceChangeEvent<?> event)
    • onValueSourceStateChanged

      protected void onValueSourceStateChanged(DataUnit.StateChangeEvent event)
    • onValueSourceValueChange

      protected void onValueSourceValueChange(ValueSource.ValueChangeEvent<V> event)
    • onComponentValueChange

      protected void onComponentValueChange()
    • unbind

      public void unbind()
      Specified by:
      unbind in interface JmixBinding
    • activate

      public void activate()
      Specified by:
      activate in interface ValueBinding<V>
    • suspend

      public void suspend()
      Specified by:
      suspend in interface SuspendableBinding
    • resume

      public void resume()
      Specified by:
      resume in interface SuspendableBinding
    • suspended

      public boolean suspended()
      Specified by:
      suspended in interface SuspendableBinding
    • setValueToSource

      protected void setValueToSource(@Nullable V value)
    • initRequired

      protected void initRequired(com.vaadin.flow.component.HasValue<?,V> component, MetaPropertyPath metaPropertyPath)
    • resetRequiredIfAttributeFiltered

      protected void resetRequiredIfAttributeFiltered(com.vaadin.flow.component.HasValue<?,V> field, EntityValueSource<?,V> valueSource, MetaPropertyPath metaPropertyPath)
      Set field's "required" flag to false if the value has been filtered by Row Level Security. This is necessary to allow user to submit form with filtered attribute even if attribute is required.
    • initBeanValidator

      protected void initBeanValidator(SupportsValidation<V> component, MetaPropertyPath mpp)
    • getComponentValue

      @Nullable protected abstract V getComponentValue()
    • setComponentValue

      protected abstract void setComponentValue(@Nullable V value)
    • addComponentValueChangeListener

      protected com.vaadin.flow.shared.Registration addComponentValueChangeListener(Runnable listener)