Package io.jmix.flowui.data
Interface ValueSource<V>
- All Known Subinterfaces:
EntityValueSource<E,V>
- All Known Implementing Classes:
BufferedContainerValueSource,ContainerValueSource
Data component holding a typed value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn event that is fired when value of source is changed.Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddValueChangeListener(Consumer<ValueSource.ValueChangeEvent<V>> listener) Registers a new value change listener.getValue()Returns the current value stored in the value source.booleanChecks whether the value source is read-only.voidSets the given value to this value source.Methods inherited from interface io.jmix.flowui.data.DataUnit
addStateChangeListener, getState
-
Method Details
-
getValue
Returns the current value stored in the value source.- Returns:
- the current value, or
nullif no value is set
-
setValue
Sets the given value to this value source.- Parameters:
value- the value to be set
-
isReadOnly
boolean isReadOnly()Checks whether the value source is read-only.- Returns:
trueif the value source is read-only,falseotherwise
-
addValueChangeListener
com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<ValueSource.ValueChangeEvent<V>> listener) Registers a new value change listener.- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-