V - Validation value typepublic static interface ValidationStatusHandler.ValidationStatusEvent<V> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
default Optional<com.holonplatform.core.i18n.Localizable> |
getError()
Get the first
Localizable validation error message, if the validation status is
ValidationStatusHandler.Status.INVALID. |
default String |
getErrorMessage()
Get the first localized error message, using the context
LocalizationContext, if available. |
default List<String> |
getErrorMessages()
Get the localized error messages from
getErrors(), using the context LocalizationContext, if
available. |
List<com.holonplatform.core.i18n.Localizable> |
getErrors()
Get the
Localizable validation error messages, if the validation status is ValidationStatusHandler.Status.INVALID. |
Optional<com.holonplatform.core.property.Property<V>> |
getProperty()
If the validation event refers to a
Property binding, returns the property to which the value
component is bound. |
Optional<ValueComponent<V>> |
getSource()
Get the
ValueComponent against whom the validation was performed. |
ValidationStatusHandler.Status |
getStatus()
Get the current validation status
|
default boolean |
isInvalid()
Gets whether the validation failed or not.
|
ValidationStatusHandler.Status getStatus()
default boolean isInvalid()
true if validation failed (i.e. the validation status is ValidationStatusHandler.Status.INVALID),
false otherwiseList<com.holonplatform.core.i18n.Localizable> getErrors()
Localizable validation error messages, if the validation status is ValidationStatusHandler.Status.INVALID.default List<String> getErrorMessages()
getErrors(), using the context LocalizationContext, if
available. If a LocalizationContext is not available, the default message of each localizable error
message is returned.default Optional<com.holonplatform.core.i18n.Localizable> getError()
Localizable validation error message, if the validation status is
ValidationStatusHandler.Status.INVALID.Localizable validation error message when in invalid statedefault String getErrorMessage()
LocalizationContext, if available. If a
LocalizationContext is not available, the default message of the first localizable error message is
returned.null if noneOptional<com.holonplatform.core.property.Property<V>> getProperty()
Property binding, returns the property to which the value
component is bound.Property to which the value component source of the validation event is bound, empty
if no property binding is availableOptional<ValueComponent<V>> getSource()
ValueComponent against whom the validation was performed.ValueComponent, empty if not availableCopyright © 2019 The Holon Platform. All rights reserved.