Interface TextComponentReadonlyDataBinding

All Known Implementing Classes:
TextComponentReadonlyDataBindingImpl

@NullMarked public interface TextComponentReadonlyDataBinding
Binds a component that implements HasText with ValueSource or InstanceContainer to show entity property value as the component text.
  • Method Summary

    Modifier and Type
    Method
    Description
    <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText>
    com.vaadin.flow.shared.Registration
    bind(C component, ValueSource<?> valueSource)
    Binds a component with ValueSource to show ValueSource.getValue() as the component text.
    <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText>
    com.vaadin.flow.shared.Registration
    bind(C component, InstanceContainer<?> dataContainer, String property)
    Binds a component with InstanceContainer to show InstanceContainer.getItem() property as the component text.
  • Method Details

    • bind

      <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> com.vaadin.flow.shared.Registration bind(C component, ValueSource<?> valueSource)
      Binds a component with ValueSource to show ValueSource.getValue() as the component text.
      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

      <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> com.vaadin.flow.shared.Registration bind(C component, InstanceContainer<?> dataContainer, String property)
      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.

      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