List of usage examples for org.apache.wicket.validation ValidationError addKey
public ValidationError addKey(IValidator<?> validator, String variation)
If the variation is empty only the validator's simple class name is used
From source file:org.devgateway.toolkit.forms.validators.YearValidator.java
License:Open Source License
@Override public void validate(final IValidatable<Integer> validatable) { if (validatable.getValue() == null) { return;//ww w.ja v a2 s .co m } if (maxCurrentYear && validatable.getValue() > Calendar.getInstance().get(Calendar.YEAR)) { ValidationError error = new ValidationError(); error.addKey(this, "maxCurrentYear"); validatable.error(error); } }