T - public class PropertyValidator<T> extends Behavior implements IValidator<T>
BeanValidationConfiguration.
The validator must be provided a Property, unless one can be resolved from the component
implicitly. By default the configuration contains the DefaultPropertyResolver so
PropertyModels are supported out of the box - when attached to a component with a
property model the property does not need to be specified explicitly.
The validator will set the required flag on the form component it is attached to based on the
presence of the @NotNull annotation. Notice, the required flag will only be set to true,
components with the required flag already set to true will not have the flag set to
false by this validator.
The validator will allow ITagModifiers configured in BeanValidationConfiguration
to mutate the markup tag of the component it is attached to.
The validator specifies default error messages in the PropertyValidator.properties file.
These values can be overridden in the application subclass' property files globally or in the
page or panel properties locally. See this file for the default messages supported.
| Constructor and Description |
|---|
PropertyValidator(Class<?>... groups) |
PropertyValidator(IModel<Class<?>[]> groups) |
PropertyValidator(Property property,
Class<?>... groups) |
PropertyValidator(Property property,
IModel<Class<?>[]> groups) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Component component) |
void |
detach(Component component) |
void |
onComponentTag(Component component,
ComponentTag tag) |
void |
onConfigure(Component component) |
void |
validate(IValidatable<T> validatable) |
afterRender, beforeRender, canCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onEvent, onException, onRemove, renderHead, unbindpublic PropertyValidator(Class<?>... groups)
public void onConfigure(Component component)
onConfigure in class Behaviorpublic void onComponentTag(Component component, ComponentTag tag)
onComponentTag in class Behaviorpublic void validate(IValidatable<T> validatable)
validate in interface IValidator<T>Copyright © 2006–2014 Apache Software Foundation. All rights reserved.