Package io.jmix.flowui.data.binding.impl
Class DataViewBindingImpl<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?,?>,V>
java.lang.Object
io.jmix.flowui.data.binding.impl.DataViewBindingImpl<C,V>
- Type Parameters:
C- the type of the component, which must extendComponentand implementHasDataViewV- the type of data provided by theDataProvider
- All Implemented Interfaces:
DataViewBinding<C,,V> JmixBinding,SuspendableBindingAware
public class DataViewBindingImpl<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?,?>,V>
extends Object
implements DataViewBinding<C,V>, SuspendableBindingAware
Implementation of the
DataViewBinding interface that binds a specific
component and data provider.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Cprotected com.vaadin.flow.shared.Registrationprotected com.vaadin.flow.data.provider.DataProvider<V,?> protected com.vaadin.flow.shared.Registrationprotected SuspendableBinding -
Constructor Summary
ConstructorsConstructorDescriptionDataViewBindingImpl(C component, com.vaadin.flow.data.provider.DataProvider<V, ?> dataProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.shared.Registrationvoidbind()Processes the binding operation.protected voidcomponentValueChanged(V value) protected booleanReturns the component associated with this binding.com.vaadin.flow.data.provider.DataProvider<V,?> Retrieves the data provider associated with this binding.protected voidonItemsChanged(EntityItems.ItemsChangeEvent<V> itemsChangeEvent) voidsetSuspendableBinding(SuspendableBinding suspendableBinding) Sets theSuspendableBindinginstance to be associated with this object.voidunbind()Processes the unbinding operation.
-
Field Details
-
dataProvider
-
component
-
suspendableBinding
-
componentValueChangeRegistration
protected com.vaadin.flow.shared.Registration componentValueChangeRegistration -
itemsChangeRegistration
protected com.vaadin.flow.shared.Registration itemsChangeRegistration
-
-
Constructor Details
-
DataViewBindingImpl
-
-
Method Details
-
getComponent
Description copied from interface:DataViewBindingReturns the component associated with this binding.- Specified by:
getComponentin interfaceDataViewBinding<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?, ?>, V> - Returns:
- the component associated with this binding
-
getDataProvider
Description copied from interface:DataViewBindingRetrieves the data provider associated with this binding.- Specified by:
getDataProviderin interfaceDataViewBinding<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?, ?>, V> - Returns:
- the data provider managing the data, or
nullif no data provider is bound
-
bind
public void bind()Description copied from interface:JmixBindingProcesses the binding operation.- Specified by:
bindin interfaceJmixBinding
-
unbind
public void unbind()Description copied from interface:JmixBindingProcesses the unbinding operation.- Specified by:
unbindin interfaceJmixBinding
-
addComponentValueChangeListener
@Nullable protected com.vaadin.flow.shared.Registration addComponentValueChangeListener() -
componentValueChanged
-
onItemsChanged
-
contains
-
setSuspendableBinding
Description copied from interface:SuspendableBindingAwareSets theSuspendableBindinginstance to be associated with this object.- Specified by:
setSuspendableBindingin interfaceSuspendableBindingAware- Parameters:
suspendableBinding- theSuspendableBindinginstance to set; may benullto clear the current binding
-