Package io.jmix.flowui.component
Interface SupportsTypedValue<C extends com.vaadin.flow.component.Component,E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<P>,V,P>
- Type Parameters:
C- the type of the component implementing this interfaceE- the type of the value change eventV- the type of the value supported by the componentP- the presentation type of the value
- All Superinterfaces:
com.vaadin.flow.component.HasValue<E,,P> Serializable
- All Known Implementing Classes:
JmixCheckboxGroup,JmixMultiSelectComboBox,JmixMultiSelectComboBoxPicker,TypedDatePicker,TypedDateTimePicker,TypedTextField,TypedTimePicker
public interface SupportsTypedValue<C extends com.vaadin.flow.component.Component,E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<P>,V,P>
extends com.vaadin.flow.component.HasValue<E,P>
Interface that defines a contract for components supporting a typed value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSupportsTypedValue.TypedValueChangeEvent<C extends com.vaadin.flow.component.Component,V> Represents a value change event for components that support typed values.Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddTypedValueChangeListener(com.vaadin.flow.component.ComponentEventListener<SupportsTypedValue.TypedValueChangeEvent<C, V>> listener) Adds a listener to be notified of changes to the typed value of the component.Returns the typed value associated with the component.voidsetTypedValue(V value) Sets the typed value of the component to the specified value.Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setValue
-
Method Details
-
getTypedValue
Returns the typed value associated with the component.- Returns:
- the typed value of the component, or
nullif no value is set
-
setTypedValue
Sets the typed value of the component to the specified value.- Parameters:
value- the new typed value to set, ornullif the value should be unset
-
addTypedValueChangeListener
com.vaadin.flow.shared.Registration addTypedValueChangeListener(com.vaadin.flow.component.ComponentEventListener<SupportsTypedValue.TypedValueChangeEvent<C, V>> listener) Adds a listener to be notified of changes to the typed value of the component.- Parameters:
listener- the listener to be added; it will handleSupportsTypedValue.TypedValueChangeEventtriggered by changes to the component's typed value- Returns:
- a
Registrationobject that can be used to remove the listener
-