@FunctionalInterface public interface ValidationStatusHandler
ValueComponent
source object.Modifier and Type | Interface and Description |
---|---|
static class |
ValidationStatusHandler.Status
Validation status.
|
static interface |
ValidationStatusHandler.ValidationStatusEvent<V>
A validation status event.
|
Modifier and Type | Method and Description |
---|---|
static ValidationStatusHandler |
getDefault()
Create and return the default
ValidationStatusHandler . |
static ValidationStatusHandler |
label(com.vaadin.ui.Label statusLabel)
Create a
ValidationStatusHandler which uses a Label to notify validation errors. |
static ValidationStatusHandler |
label(com.vaadin.ui.Label statusLabel,
boolean hideWhenValid)
Create a
ValidationStatusHandler which uses a Label to notify validation errors. |
static ValidationStatusHandler |
notification()
Create a
ValidationStatusHandler which shows a Notification of type
Notification.TYPE_ERROR_MESSAGE to notify validation errors. |
static ValidationStatusHandler |
notification(boolean showAllErrors)
Create a
ValidationStatusHandler which shows a Notification of type
Notification.TYPE_ERROR_MESSAGE to notify validation errors. |
static ValidationStatusHandler |
notification(com.vaadin.ui.Notification notification)
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
static ValidationStatusHandler |
notification(com.vaadin.ui.Notification notification,
boolean showAllErrors)
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
void |
validationStatusChange(ValidationStatusHandler.ValidationStatusEvent<?> statusChangeEvent)
Invoked when the validation status has changed.
|
void validationStatusChange(ValidationStatusHandler.ValidationStatusEvent<?> statusChangeEvent)
statusChangeEvent
- the changed status event, providing validation status, error message and the optional
source componentstatic ValidationStatusHandler getDefault()
ValidationStatusHandler
.
The default validation status handler uses
AbstractComponent.setComponentError(com.vaadin.server.ErrorMessage)
to notify the validation status on
the value component against whom the validation is performed, if it is available and the component returned by
HasComponent.getComponent()
is an AbstractComponent
instance.
ValidationStatusHandler
instancestatic ValidationStatusHandler label(com.vaadin.ui.Label statusLabel)
ValidationStatusHandler
which uses a Label
to notify validation errors.
By default, the status Label
is set to visible only when the validation status is invalid, i.e. a
validation error to display is available.
statusLabel
- The Label
to use to notify validation errors (not null)Label
validation status handler instancestatic ValidationStatusHandler label(com.vaadin.ui.Label statusLabel, boolean hideWhenValid)
ValidationStatusHandler
which uses a Label
to notify validation errors.statusLabel
- The Label
to use to notify validation errors (not null)hideWhenValid
- whether to hide the Label when the validation status is not invalidLabel
validation status handler instancestatic ValidationStatusHandler notification()
ValidationStatusHandler
which shows a Notification
of type
Notification.TYPE_ERROR_MESSAGE
to notify validation errors.
This methods creates a notification validation status handler which displays only the first validation error.
static ValidationStatusHandler notification(boolean showAllErrors)
ValidationStatusHandler
which shows a Notification
of type
Notification.TYPE_ERROR_MESSAGE
to notify validation errors.showAllErrors
- true
to display all validation errors, false
to show only the
firststatic ValidationStatusHandler notification(com.vaadin.ui.Notification notification)
ValidationStatusHandler
which shows a Notification
to notify validation errors.
This methods creates a notification validation status handler which displays only the first validation error.
notification
- The notification instance to use, null
for defaultstatic ValidationStatusHandler notification(com.vaadin.ui.Notification notification, boolean showAllErrors)
ValidationStatusHandler
which shows a Notification
to notify validation errors.notification
- The notification instance to use, null
for defaultshowAllErrors
- true
to display all validation errors, false
to show only the
firstCopyright © 2019 The Holon Platform. All rights reserved.