Package io.jmix.flowui.data.binding.impl
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTextComponentReadonlyDataBindingImpl(MetadataTools metadataTools, AccessManager accessManager) -
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.protected voidcheckPermissions(com.vaadin.flow.component.Component component, ValueSource<?> valueSource) protected voidcheckPermissions(com.vaadin.flow.component.Component component, InstanceContainer<?> dataContainer, String property) protected voidupdateComponentText(com.vaadin.flow.component.HasText component, @Nullable Object value)
-
Field Details
-
metadataTools
-
accessManager
-
-
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:TextComponentReadonlyDataBindingBinds a component withValueSourceto showValueSource.getValue()as the component text.- Specified by:
bindin interfaceTextComponentReadonlyDataBinding- 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
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:TextComponentReadonlyDataBindingBinds 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.- Specified by:
bindin interfaceTextComponentReadonlyDataBinding- 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
-
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)
-