Package com.vaadin.flow.data.binder
Class ValueContext
java.lang.Object
com.vaadin.flow.data.binder.ValueContext
- All Implemented Interfaces:
Serializable
Value context for
Converter
s. Contains relevant information for
converting values.- Since:
- 1.0.
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructor forValueContext
without aLocale
.ValueContext
(Component component) Constructor forValueContext
.ValueContext
(Component component, HasValue<?, ?> hasValue) Constructor forValueContext
.ValueContext
(Component component, HasValue<?, ?> hasValue, Locale locale) Constructor forValueContext
.ValueContext
(Locale locale) Constructor forValueContext
without aComponent
. -
Method Summary
Modifier and TypeMethodDescriptionReturns anOptional
for theComponent
related to value conversion.Returns anOptional
for theHasValue
used in the value conversion.Returns anOptional
for theLocale
used in the value conversion.
-
Constructor Details
-
ValueContext
public ValueContext()Constructor forValueContext
without aLocale
. -
ValueContext
Constructor forValueContext
without aComponent
.- Parameters:
locale
- The locale used with conversion. Can be null.
-
ValueContext
Constructor forValueContext
.- Parameters:
component
- The component related to current value. Can be null. If the component implementsHasValue
, it will be returned bygetHasValue()
as well.
-
ValueContext
Constructor forValueContext
.- Parameters:
component
- The component related to current value. Can be null.hasValue
- The value source related to current value. Can be null.
-
ValueContext
Constructor forValueContext
.- Parameters:
component
- The component can benull
.locale
- The locale used with conversion. Can benull
.hasValue
- The value source related to current value. Can benull
.
-
-
Method Details
-
getComponent
Returns anOptional
for theComponent
related to value conversion.- Returns:
- the optional of component
-
getLocale
Returns anOptional
for theLocale
used in the value conversion.- Returns:
- the optional of locale
-
getHasValue
Returns anOptional
for theHasValue
used in the value conversion. In certain complicated cases, ex. cross-field validation, HasValue might be not available.- Returns:
- the optional of
HasValue
-