Package io.jmix.flowui.data.binding
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 TypeMethodDescription<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText>
com.vaadin.flow.shared.Registrationbind(C component, ValueSource<?> valueSource) Binds a component withValueSourceto showValueSource.getValue()as the component text.<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText>
com.vaadin.flow.shared.Registrationbind(C component, InstanceContainer<?> dataContainer, String property) Binds a component withInstanceContainerto showInstanceContainer.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 withValueSourceto showValueSource.getValue()as the component text.- Type Parameters:
C- type of the component- Parameters:
component- component to show the value invalueSource- 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 withInstanceContainerto showInstanceContainer.getItem()property as the component text.A
CollectionContainercan 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 indataContainer- instance containerproperty- name of an entity property whose value is shown in the component- Returns:
- a registration object for removing an event listener
-