Package io.jmix.flowui.data.binding.impl
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 Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected org.springframework.context.ApplicationContextprotected com.vaadin.flow.component.HasValue<?,V> protected com.vaadin.flow.shared.Registrationprotected MessageToolsprotected MetadataToolsprotected booleanprotected jakarta.validation.Validatorprotected ValueSource<V>protected com.vaadin.flow.shared.Registrationprotected com.vaadin.flow.shared.Registrationprotected com.vaadin.flow.shared.Registration -
Constructor Summary
ConstructorsConstructorDescriptionAbstractValueBinding(ValueSource<V> valueSource, com.vaadin.flow.component.HasValue<?, V> component) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()protected com.vaadin.flow.shared.RegistrationaddComponentValueChangeListener(Runnable listener) voidbind()com.vaadin.flow.component.HasValue<?,V> protected abstract Vprotected voidinitBeanValidator(SupportsValidation<V> component, MetaPropertyPath mpp) protected voidinitRequired(com.vaadin.flow.component.HasValue<?, V> component, MetaPropertyPath metaPropertyPath) protected voidprotected voidprotected voidprotected voidprotected voidresetRequiredIfAttributeFiltered(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.voidresume()voidsetAccessManager(AccessManager accessManager) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected abstract voidsetComponentValue(V value) voidsetMessageTools(MessageTools messageTools) voidsetMetadataTools(MetadataTools metadataTools) voidsetValidator(jakarta.validation.Validator validator) protected voidsetValueToSource(V value) voidsuspend()booleanvoidunbind()
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
messageTools
-
metadataTools
-
validator
protected jakarta.validation.Validator validator -
accessManager
-
valueSource
-
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
-
setMetadataTools
-
setValidator
@Autowired public void setValidator(jakarta.validation.Validator validator) -
setAccessManager
-
getValueSource
- Specified by:
getValueSourcein interfaceValueBinding<V>
-
getComponent
- Specified by:
getComponentin interfaceValueBinding<V>
-
bind
public void bind()- Specified by:
bindin interfaceJmixBinding
-
onValueSourceInstanceChanged
-
onValueSourceStateChanged
-
onValueSourceValueChange
-
onComponentValueChange
protected void onComponentValueChange() -
unbind
public void unbind()- Specified by:
unbindin interfaceJmixBinding
-
activate
public void activate()- Specified by:
activatein interfaceValueBinding<V>
-
suspend
public void suspend()- Specified by:
suspendin interfaceSuspendableBinding
-
resume
public void resume()- Specified by:
resumein interfaceSuspendableBinding
-
suspended
public boolean suspended()- Specified by:
suspendedin interfaceSuspendableBinding
-
setValueToSource
-
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
-
getComponentValue
-
setComponentValue
-
addComponentValueChangeListener
-