Class TextComponentReadonlyDataBindingImpl

java.lang.Object
io.jmix.flowui.data.binding.impl.TextComponentReadonlyDataBindingImpl
All Implemented Interfaces:
TextComponentReadonlyDataBinding

@NullMarked @Component("flowui_TextComponentReadonlyDataBinding") public class TextComponentReadonlyDataBindingImpl extends Object implements TextComponentReadonlyDataBinding
Implementation of TextComponentReadonlyDataBinding. This class provides functionality for binding a component that implements HasText with a ValueSource or an InstanceContainer to display entity property values as the component text.
  • Field Details

  • Constructor Details

    • TextComponentReadonlyDataBindingImpl

      public TextComponentReadonlyDataBindingImpl(MetadataTools metadataTools, AccessManager accessManager)
  • Method Details

    • bind

      public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> com.vaadin.flow.shared.Registration bind(C component, ValueSource<?> valueSource)
      Description copied from interface: TextComponentReadonlyDataBinding
      Binds a component with ValueSource to show ValueSource.getValue() as the component text.
      Specified by:
      bind in interface TextComponentReadonlyDataBinding
      Type Parameters:
      C - type of the component
      Parameters:
      component - component to show the value in
      valueSource - data component holding a typed value
      Returns:
      a registration object for removing an event listener
    • bind

      public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> com.vaadin.flow.shared.Registration bind(C component, InstanceContainer<?> dataContainer, String property)
      Description copied from interface: TextComponentReadonlyDataBinding
      Binds a component with InstanceContainer to show InstanceContainer.getItem() property as the component text.

      A CollectionContainer can be passed as well, in which case the property of its current item is shown.

      Specified by:
      bind in interface TextComponentReadonlyDataBinding
      Type Parameters:
      C - type of the component
      Parameters:
      component - component to show the value in
      dataContainer - instance container
      property - name of an entity property whose value is shown in the component
      Returns:
      a registration object for removing an event listener
    • updateComponentText

      protected void updateComponentText(com.vaadin.flow.component.HasText component, @Nullable Object value)
    • checkPermissions

      protected void checkPermissions(com.vaadin.flow.component.Component component, ValueSource<?> valueSource)
    • checkPermissions

      protected void checkPermissions(com.vaadin.flow.component.Component component, InstanceContainer<?> dataContainer, String property)