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 extend Component and implement HasDataView
V - the type of data provided by the DataProvider
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 Details

    • dataProvider

      protected com.vaadin.flow.data.provider.DataProvider<V,?> dataProvider
    • component

      protected C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?,?> component
    • suspendableBinding

      protected SuspendableBinding suspendableBinding
    • componentValueChangeRegistration

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

      protected com.vaadin.flow.shared.Registration itemsChangeRegistration
  • Constructor Details

    • DataViewBindingImpl

      public DataViewBindingImpl(C component, com.vaadin.flow.data.provider.DataProvider<V,?> dataProvider)
  • Method Details

    • getComponent

      public C getComponent()
      Description copied from interface: DataViewBinding
      Returns the component associated with this binding.
      Specified by:
      getComponent in interface DataViewBinding<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?,?>,V>
      Returns:
      the component associated with this binding
    • getDataProvider

      public com.vaadin.flow.data.provider.DataProvider<V,?> getDataProvider()
      Description copied from interface: DataViewBinding
      Retrieves the data provider associated with this binding.
      Specified by:
      getDataProvider in interface DataViewBinding<C extends com.vaadin.flow.component.Component & com.vaadin.flow.data.provider.HasDataView<V,?,?>,V>
      Returns:
      the data provider managing the data, or null if no data provider is bound
    • bind

      public void bind()
      Description copied from interface: JmixBinding
      Processes the binding operation.
      Specified by:
      bind in interface JmixBinding
    • unbind

      public void unbind()
      Description copied from interface: JmixBinding
      Processes the unbinding operation.
      Specified by:
      unbind in interface JmixBinding
    • addComponentValueChangeListener

      @Nullable protected com.vaadin.flow.shared.Registration addComponentValueChangeListener()
    • componentValueChanged

      protected void componentValueChanged(@Nullable V value)
    • onItemsChanged

      protected void onItemsChanged(EntityItems.ItemsChangeEvent<V> itemsChangeEvent)
    • contains

      protected boolean contains(List<V> items, Object value)
    • setSuspendableBinding

      public void setSuspendableBinding(@Nullable SuspendableBinding suspendableBinding)
      Description copied from interface: SuspendableBindingAware
      Sets the SuspendableBinding instance to be associated with this object.
      Specified by:
      setSuspendableBinding in interface SuspendableBindingAware
      Parameters:
      suspendableBinding - the SuspendableBinding instance to set; may be null to clear the current binding