com.vaadin.flow.data.binder.
Class ValueContext
All Implemented Interfaces:
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 for
ValueContext
without aLocale
.ValueContext
(Binder binder, Component component) Constructor for
ValueContext
.ValueContext
(Binder binder, Component component, HasValue<?, ?> hasValue) Constructor for
ValueContext
.ValueContext
(Binder binder, Component component, HasValue<?, ?> hasValue, Locale locale) Constructor for
ValueContext
.ValueContext
(Binder binder, Locale locale) Constructor for
ValueContext
without aComponent
.ValueContext
(Locale locale) Deprecated.
Use the version with binder reference instead -
Method Summary
Modifier and TypeMethodDescriptionReturns an
Optional
for theBinder
owning this value context.Returns an
Optional
for theComponent
related to value conversion.Returns an
Optional
for theHasValue
used in the value conversion.Returns an
Optional
for theLocale
used in the value conversion.
-
Constructor Details
-
ValueContext
Constructor for
ValueContext
without aLocale
.Parameters:
binder
- the Binder using the value context -
ValueContext
Constructor for
ValueContext
without aComponent
.Parameters:
binder
- the Binder using the value contextlocale
- The locale used with conversion. Can be null. -
ValueContext
Constructor for
ValueContext
.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 for
ValueContext
.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 for
ValueContext
.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 for
ValueContext
without aLocale
. -
ValueContext
Deprecated.Use the version with binder reference insteadConstructor for
ValueContext
without aComponent
.Parameters:
locale
- The locale used with conversion. Can be null. -
ValueContext
Deprecated.Use the version with binder reference insteadConstructor for
ValueContext
.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 for
ValueContext
.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 for
ValueContext
.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 an
Optional
for theComponent
related to value conversion.Returns:
the optional of component
-
getLocale
Returns an
Optional
for theLocale
used in the value conversion.Returns:
the optional of locale
-
getHasValue
Returns an
Optional
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 an
Optional
for theBinder
owning this value context.Returns:
the optional of
Binder
-