You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Migrating to Wicket 6.0

Environment

  • Wicket 6.0 requires at least Java 6

Repeaters

  • `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175).

Form Processing

Validation

  • `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead
  • `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead
  • `StringValidator` will add the `maxlen` 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
  • Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors

Ajax

Use JQuery as a backing library for Wicket Ajax functionality

Apache Wicket needed to improve the implementation of its JavaScript libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger JavaScript libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that.
For more information read ...

List of renamed classes and methods

Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6.

Here's a table of deprecated classes and methods in Wicket 1.5 and the corresponding replacement in Wicket 6.

Wicket 1.5 (deprecated)

Wicket 6 (replacement)

org.apache.wicket.behavior.SimpleAttributeModifier

org.apache.wicket.AttributeModifier#replace(...)

org.apache.wicket.request.Url#toAbsoluteString()

org.apache.wicket.request.Url#toString(StringMode.FULL)

  • No labels