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,ValueBinding<V>
- Direct Known Subclasses:
FieldValueBinding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected com.vaadin.flow.component.HasValue<?,V> protected com.vaadin.flow.shared.Registrationprotected MessageToolsprotected MetadataToolsprotected javax.validation.Validatorprotected ValueSource<V>protected 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 component, MetaPropertyPath mpp) protected voidinitRequired(com.vaadin.flow.component.HasValue<?, V> component, MetaPropertyPath metaPropertyPath) protected voidprotected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected abstract voidsetComponentValue(V value) voidsetMessageTools(MessageTools messageTools) voidsetMetadataTools(MetadataTools metadataTools) voidsetValidator(javax.validation.Validator validator) protected voidsetValueToSource(V value) voidunbind()protected void
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
messageTools
-
metadataTools
-
validator
protected javax.validation.Validator validator -
valueSource
-
component
-
componentValueChangeRegistration
protected com.vaadin.flow.shared.Registration componentValueChangeRegistration -
valueSourceValueChangeSubscription
protected com.vaadin.flow.shared.Registration valueSourceValueChangeSubscription -
valueSourceStateChangeSubscription
protected com.vaadin.flow.shared.Registration valueSourceStateChangeSubscription
-
-
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) -
getValueSource
- Specified by:
getValueSourcein interfaceValueBinding<V>
-
getComponent
- Specified by:
getComponentin interfaceValueBinding<V>
-
bind
public void bind()- Specified by:
bindin interfaceJmixBinding
-
valueSourceStateChanged
-
onValueSourceValueChange
-
onComponentValueChange
protected void onComponentValueChange() -
unbind
public void unbind()- Specified by:
unbindin interfaceJmixBinding
-
activate
public void activate()- Specified by:
activatein interfaceValueBinding<V>
-
setValueToSource
-
initRequired
protected void initRequired(com.vaadin.flow.component.HasValue<?, V> component, MetaPropertyPath metaPropertyPath) -
initBeanValidator
-
getComponentValue
-
setComponentValue
-
addComponentValueChangeListener
-