Versions Compared

Key

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

...

This is an improvement in Wicket 7.0 which should not affect any application migrating from Wicket 6.x. But if you use Servlet 3.0's AsyncContext in IResource in Wicket 7 then make sure that your code flushes the http response after completing the request.

API changes

Changes to org.apache.wicket.ajax.json.*  Image AddedWICKET-6287 - Switch from json.org to open-json RESOLVED

Because of license issues all classes in the mentioned package have been replaced by classes of open-json (https://github.com/tdunning/open-json) which means that the basic functionality is nearly the same. Some classes however (example: org.json.HTTP) are throwing WicketRuntimeExceptions because there is no corresponding implementation in open-json, yet. json.org can be used in this case (can be found in the central maven repository) if the license conditions are accepted.

DecimalConverters' number format WICKET-5853 WICKET-5861

org.apache.wicket.util.convert.converter.AbstractDecimalConverter's #getNumberFormat() and #setNumberFormat() has been removed in favour of #newNumberFormat(). Applications using the old methods should override the new one, where they configure specifics or preserve a reference to the created NumberFormat.

org/apache/wicket/core/util/io/SerializableChecker is replaced with org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream WICKET-4817

...

The old API returned Iterable<? extends HeaderItem> and was inconvenient to override and add additional dependencies.
With the new API it is as easy as:

Code Block
borderStylesolid
titleMyResourceReference.java
borderStylesolid
@Override
public List<HeaderItem> getDependencies() {
  List<HeaderItem> dependencies = super.getDependencies();
  dependencies.add(dep1);
  dependencies.add(dep2);
  return dependencies;
}

...

To use AjaxFormValidatingBehavior in Wicket 6.x the application code should do something like:

Code Block
borderStylesolid
titleMyComponent.javaborderStylesolid
AjaxFormValidatingBehavior.addToAllFormComponents(form, "keydown", Duration.ONE_SECOND);

...

The behavior has been reworked a bit to allow this. The new usage is:

Code Block
borderStylesolid
titleMyComponent.java
borderStylesolid
form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND);

or

Code Block
borderStylesolid
titleMyComponent.java
borderStylesolid
formComponent.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND);

...

To migrate it you should do something like:

Code Block
borderStylesolid
titleOldMyTextField.java
borderStylesolid
...
@Override
protected String getInputType()
{
	return "sometype";
}
...

to

Code Block
borderStylesolid
titleNewMyTextField.java
borderStylesolid
...
@Override
protected String[] getInputTypes()
{
	return new String[] { "sometype" };
}
...

...

Note: MountMapper and its related classes are still available in 7.x but deprecated and not used by Wicket itself. They will be completely removed in Wicket 8.0.0

Renamed all *AjaxResponse classes to *PartialPageUpdate WICKET-5929

XmlAjaxResponse was renamed to XmlPartialPageUpdate (see git commit 7c40e4dafa75973bf99b34567d977f310a5f02d0) 

AuthenticatedWebApplication#onUnauthorizedPage WICKET-5490

...

Rename PageSettings#recreateMountedPagesAfterExpiry to #recreateBookmarkablePagesAfterExpiry WICKET-5829
Rename IStaticCacheableResource#getCacheableResourceStream() to #getResourceStream() WICKET-5909

Behavior changes

org.apache.wicket.request.Url#getQueryString WICKET-4664

...