Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag
  • `AbstractValidator` has been removed
  • `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant").
  • Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do
    Code Block
    class MyStringValidator extends StringValidator {
        ValidationError decoreate(ValidationError error, IValidatable validatable) {
           error.addKey("mystringerror");
           return error;
        }
    }
    
  • org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable).
  • IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879

Feedback Storage Refactoring

...