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
ConstructorsConstructorDescriptionDeprecated.Use the version with binder reference insteadValueContext
(Component component) Deprecated.Use the version with binder reference insteadValueContext
(Component component, HasValue<?, ?> hasValue) Deprecated.Use the version with binder reference insteadValueContext
(Component component, HasValue<?, ?> hasValue, Locale locale) Deprecated.Use the version with binder reference insteadValueContext
(Binder<?> binder) Constructor forValueContext
without aLocale
.ValueContext
(Binder binder, Component component) Constructor forValueContext
.ValueContext
(Binder binder, Component component, HasValue<?, ?> hasValue) Constructor forValueContext
.ValueContext
(Binder binder, Component component, HasValue<?, ?> hasValue, Locale locale) Constructor forValueContext
.ValueContext
(Binder binder, Locale locale) Constructor forValueContext
without aComponent
.ValueContext
(Locale locale) Deprecated.Use the version with binder reference instead -
Method Summary
Modifier and TypeMethodDescriptionReturns anOptional
for theBinder
owning this value context.Returns 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
Constructor forValueContext
without aLocale
.- Parameters:
binder
- the Binder using the value context
-
ValueContext
Constructor forValueContext
without aComponent
.- Parameters:
binder
- the Binder using the value contextlocale
- The locale used with conversion. Can be null.
-
ValueContext
Constructor forValueContext
.- Parameters:
binder
- the Binder using the value contextcomponent
- The component related to current value. Can be null. If the component implementsHasValue
, it will be returned bygetHasValue()
as well.
-
ValueContext
Constructor forValueContext
.- Parameters:
binder
- the Binder using the value contextcomponent
- The component related to current value. Can be null.hasValue
- The value source related to current value. Can be null.
-
ValueContext
Constructor forValueContext
.- Parameters:
binder
- the Binder using the value contextcomponent
- The component can benull
.locale
- The locale used with conversion. Can benull
.hasValue
- The value source related to current value. Can benull
.
-
ValueContext
Deprecated.Use the version with binder reference insteadConstructor forValueContext
without aLocale
. -
ValueContext
Deprecated.Use the version with binder reference insteadConstructor forValueContext
without aComponent
.- Parameters:
locale
- The locale used with conversion. Can be null.
-
ValueContext
Deprecated.Use the version with binder reference insteadConstructor forValueContext
.- Parameters:
component
- The component related to current value. Can be null. If the component implementsHasValue
, it will be returned bygetHasValue()
as well.
-
ValueContext
Deprecated.Use the version with binder reference insteadConstructor forValueContext
.- Parameters:
component
- The component related to current value. Can be null.hasValue
- The value source related to current value. Can be null.
-
ValueContext
Deprecated.Use the version with binder reference insteadConstructor 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
-
getBinder
Returns anOptional
for theBinder
owning this value context.- Returns:
- the optional of
Binder
-