S - Validation source type@FunctionalInterface public interface ValidationStatusHandler<S> extends Serializable
ValueComponent source object.| Modifier and Type | Interface and Description |
|---|---|
static class |
ValidationStatusHandler.Status
Validation status.
|
static interface |
ValidationStatusHandler.ValidationStatusEvent<S>
A validation status event.
|
| Modifier and Type | Method and Description |
|---|---|
static <S> ValidationStatusHandler<S> |
dialog()
Create a
ValidationStatusHandler which shows a Dialog to notify validation errors. |
static <S extends HasComponent> |
getDefault()
Create and return the default
ValidationStatusHandler for HasComponent types. |
static <S extends HasComponent> |
getDefault(ValidationStatusHandler<S> fallback)
Create and return the default
ValidationStatusHandler for HasComponent types. |
static <S,L extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> |
label(L statusLabel)
Create a
ValidationStatusHandler which uses a HasText component to notify validation errors. |
static <S,L extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> |
label(L statusLabel,
boolean hideWhenValid)
Create a
ValidationStatusHandler which uses a HasText component to notify validation errors. |
static <S> ValidationStatusHandler<S> |
notification()
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
static <S> ValidationStatusHandler<S> |
notification(boolean showAllErrors)
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
static <S> ValidationStatusHandler<S> |
notification(com.vaadin.flow.component.notification.Notification notification)
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
static <S> ValidationStatusHandler<S> |
notification(com.vaadin.flow.component.notification.Notification notification,
boolean showAllErrors)
Create a
ValidationStatusHandler which shows a Notification to notify validation errors. |
void |
validationStatusChange(ValidationStatusHandler.ValidationStatusEvent<S> statusChangeEvent)
Invoked when the validation status has changed.
|
void validationStatusChange(ValidationStatusHandler.ValidationStatusEvent<S> statusChangeEvent)
statusChangeEvent - the changed status event, providing validation status and error messagesstatic <S extends HasComponent> ValidationStatusHandler<S> getDefault()
ValidationStatusHandler for HasComponent types.
The default validation status handler uses {HasValidation.setErrorMessage(String) to notify the
validation status on the value component against whom the validation is performed, if the component implements
HasValidation.
If the component against whom the validation is performed does not implement HasValidation, a warning is
logged.
S - Validation sourceValidationStatusHandler instancestatic <S extends HasComponent> ValidationStatusHandler<S> getDefault(ValidationStatusHandler<S> fallback)
ValidationStatusHandler for HasComponent types.
The default validation status handler uses {HasValidation.setErrorMessage(String) to notify the
validation status on the value component against whom the validation is performed, if the component implements
HasValidation.
If the component against whom the validation is performed does not implement HasValidation, a warning is
logged.
S - Validation sourcefallback - The ValidationStatusHandler to use when the component on which the validation failed has
not validation supportValidationStatusHandler instancestatic <S,L extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> ValidationStatusHandler<S> label(L statusLabel)
ValidationStatusHandler which uses a HasText component 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.
S - Validation sourceL - Label component typestatusLabel - The HasText component to use to notify validation errors (not null)static <S,L extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText> ValidationStatusHandler<S> label(L statusLabel, boolean hideWhenValid)
ValidationStatusHandler which uses a HasText component to notify validation errors.S - Validation sourceL - Label component typestatusLabel - The HasText component to use to notify validation errors (not null)hideWhenValid - whether to hide the component when the validation status is not invalidstatic <S> ValidationStatusHandler<S> 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.
S - Validation sourcestatic <S> ValidationStatusHandler<S> notification(boolean showAllErrors)
ValidationStatusHandler which shows a Notification to notify validation errors.S - Validation sourceshowAllErrors - true to display all validation errors, false to show only the
firststatic <S> ValidationStatusHandler<S> notification(com.vaadin.flow.component.notification.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.
S - Validation sourcenotification - The notification instance to use, null for defaultstatic <S> ValidationStatusHandler<S> notification(com.vaadin.flow.component.notification.Notification notification, boolean showAllErrors)
ValidationStatusHandler which shows a Notification to notify validation errors.S - Validation sourcenotification - The notification instance to use, null for defaultshowAllErrors - true to display all validation errors, false to show only the
firststatic <S> ValidationStatusHandler<S> dialog()
ValidationStatusHandler which shows a Dialog to notify validation errors.S - Validation sourceDialog notification validation status handler instanceCopyright © 2019 The Holon Platform. All rights reserved.