V
- type of valuepublic interface ValueBinding<V> extends Binding
HasValue
UI component.Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates value binding - reads value from source to UI component if state is
BindingState.ACTIVE . |
void |
discard()
Discards all changes since last write.
|
HasValue<V> |
getComponent() |
ValueSource<V> |
getSource() |
boolean |
isBuffered() |
boolean |
isModified()
Tests if the value stored in the component has been modified since it was
last updated from the value source.
|
void |
setBuffered(boolean buffered)
Sets the buffered mode.
|
void |
write()
Updates all changes since the previous write to the value source.
|
ValueSource<V> getSource()
void activate()
BindingState.ACTIVE
.void write()
void discard()
boolean isBuffered()
true
if the buffered mode is on, false
otherwisevoid setBuffered(boolean buffered)
When in buffered mode, the component value changes will not be reflected
in value source until write()
is called. Calling discard()
will revert the components value to the value of the value source.
When in non-buffered mode both read and write operations will be done
directly on the value source. In this mode the write()
and
discard()
methods serve no purpose.
If the value in the component has been modified since the last value source update and the buffered mode is switched off at runtime, then the component will update its value from the value source.
buffered
- true
if the buffered mode should be turned on, false
otherwiseboolean isModified()
true
if the value in the component has been modified
since the last value source update, false
if not.