public final class Violation extends Object implements org.apache.wicket.model.IDetachable
ModelPath
s that
led up to the violation and three parameters that can be used to generate a translated description of the violation.
These parameters are a message key, an array of parameters for value substitution in the translation and a
resourceBundleClass to specify the location of the resource bundle.Constructor and Description |
---|
Violation(Class<?> resourceBundleClass,
String messageKey,
Object[] parameters,
Set<ModelPath> fieldPaths)
Deprecated.
use the
Violation(Set, IModel) constructor instead. |
Violation(Set<ModelPath> paths,
org.apache.wicket.model.IModel<String> messageModel)
Create a new violation with the specified message.
|
Modifier and Type | Method and Description |
---|---|
void |
detach() |
Set<ModelPath> |
getDependentPaths() |
org.apache.wicket.model.IModel<String> |
getMessage() |
String |
toString() |
@Deprecated public Violation(Class<?> resourceBundleClass, String messageKey, Object[] parameters, Set<ModelPath> fieldPaths)
Violation(Set, IModel)
constructor instead.resourceBundleClass
parameter.
This constructor has been deprecated. Validators should provide their own message translation.resourceBundleClass
- Resource bundle will be looked up relative to this classmessageKey
- The key used for translationparameters
- Optional parameters for value substitution in translationsfieldPaths
- List of ModelPath
s that led up to the violationpublic org.apache.wicket.model.IModel<String> getMessage()
public void detach()
detach
in interface org.apache.wicket.model.IDetachable
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.