BEAN - the bean typeTARGET - the target data type of the binding, matches the field type
unless a converter has been setpublic static interface Binder.Binding<BEAN,TARGET> extends Serializable
Binder.forField(HasValue)| Modifier and Type | Method and Description |
|---|---|
HasValue<?,?> |
getField()
Gets the field the binding uses.
|
ValueProvider<BEAN,TARGET> |
getGetter()
Gets the getter associated with this Binding.
|
Setter<BEAN,TARGET> |
getSetter()
Gets the setter associated with this Binding.
|
BindingValidationStatusHandler |
getValidationStatusHandler()
Gets the validation status handler for this Binding.
|
boolean |
isReadOnly()
Gets the current read-only status for this Binding.
|
void |
read(BEAN bean)
Reads the value from given item and stores it to the bound field.
|
void |
setReadOnly(boolean readOnly)
Sets the read-only status on for this Binding.
|
void |
unbind()
Unbinds the binding from its respective
Binder. |
default BindingValidationStatus<TARGET> |
validate()
Validates the field value and returns a
ValidationStatus
instance representing the outcome of the validation. |
BindingValidationStatus<TARGET> |
validate(boolean fireEvent)
Validates the field value and returns a
ValidationStatus
instance representing the outcome of the validation. |
HasValue<?,?> getField()
default BindingValidationStatus<TARGET> validate()
ValidationStatus
instance representing the outcome of the validation. This method is a
short-hand for calling validate(boolean) with
fireEvent true.validate(boolean),
Binder.validate(),
Validator.apply(Object, ValueContext)BindingValidationStatus<TARGET> validate(boolean fireEvent)
ValidationStatus
instance representing the outcome of the validation.fireEvent - true to fire status event; false to notvalidate()BindingValidationStatusHandler getValidationStatusHandler()
void unbind()
Binder. Removes any
ValueChangeListener Registration from associated
HasValue.void read(BEAN bean)
bean - the bean to read fromvoid setReadOnly(boolean readOnly)
This helper method is the preferred way to control the read-only state of the bound field.
readOnly - true to set binding read-only; false to
enable writesIllegalStateException - if trying to make binding read-write and the setter is
nullboolean isReadOnly()
true if read-only; false if notsetReadOnly(boolean)ValueProvider<BEAN,TARGET> getGetter()
Copyright © 2000–2019 Vaadin Ltd. All rights reserved.