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
Modifier and TypeFieldDescriptionprotected AccessManager
protected org.springframework.context.ApplicationContext
protected com.vaadin.flow.component.HasValue<?,
V> protected com.vaadin.flow.shared.Registration
protected MessageTools
protected MetadataTools
protected boolean
protected javax.validation.Validator
protected ValueSource<V>
protected com.vaadin.flow.shared.Registration
protected com.vaadin.flow.shared.Registration
protected com.vaadin.flow.shared.Registration
-
Constructor Summary
ConstructorDescriptionAbstractValueBinding
(ValueSource<V> valueSource, com.vaadin.flow.component.HasValue<?, V> component) -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
protected com.vaadin.flow.shared.Registration
addComponentValueChangeListener
(Runnable listener) void
bind()
com.vaadin.flow.component.HasValue<?,
V> protected abstract V
protected void
initBeanValidator
(SupportsValidation<V> component, MetaPropertyPath mpp) protected void
initRequired
(com.vaadin.flow.component.HasValue<?, V> component, MetaPropertyPath metaPropertyPath) protected void
protected void
protected void
protected void
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.void
resume()
void
setAccessManager
(AccessManager accessManager) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) protected abstract void
setComponentValue
(V value) void
setMessageTools
(MessageTools messageTools) void
setMetadataTools
(MetadataTools metadataTools) void
setValidator
(javax.validation.Validator validator) protected void
setValueToSource
(V value) void
suspend()
boolean
void
unbind()
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
messageTools
-
metadataTools
-
validator
protected javax.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(javax.validation.Validator validator) -
setAccessManager
-
getValueSource
- Specified by:
getValueSource
in interfaceValueBinding<V>
-
getComponent
- Specified by:
getComponent
in interfaceValueBinding<V>
-
bind
public void bind()- Specified by:
bind
in interfaceJmixBinding
-
onValueSourceInstanceChanged
-
onValueSourceStateChanged
-
onValueSourceValueChange
-
onComponentValueChange
protected void onComponentValueChange() -
unbind
public void unbind()- Specified by:
unbind
in interfaceJmixBinding
-
activate
public void activate()- Specified by:
activate
in interfaceValueBinding<V>
-
suspend
public void suspend()- Specified by:
suspend
in interfaceSuspendableBinding
-
resume
public void resume()- Specified by:
resume
in interfaceSuspendableBinding
-
suspended
public boolean suspended()- Specified by:
suspended
in 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
-