Versions Compared

Key

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

...

PackageResourceReference is improved to be able to load a minified/compressed version of a resource.
By default in development mode the non-minimized resource is loaded (resource.ext) while in production mode it will try to load resource.min.ext by automatically inserting .min right before the extension. If there is no such resource with that name then it will fall back to the non-minified version.
This behavior can be configured with org.apache.wicket.settings.IResourceSettings#setUseMinifiedResources(boolean).

ResourceStreamLocator and ResourceFinder have been cleaned up

The responsibilities of ResourceStreamLocator and IResourceFinder have been untangled and cleaned.

  • ResourceStreamLocator now purely generates pathnames using a ResourceNameIterator and then uses a list of IResourceFinders to actually get those resources.
  • ResourceStreamLocator no longer does resource loading from the classpath on its own. Instead, there is now ClassPathResourceFinder.
  • IResourceSettings no longer contains just a single ResourceFinder but rather a list of them that will be tried in the given order.
  • Path and WebApplicationPath no longer extend each other, and also no longer have a list of prefixes, only a single one. If you need several path prefixes, simply add more Paths, WebApplicationPaths or other IResourceFinder implementations to IResourceSettings#resourcesFinders.
  • The IResourcePath interface was removed, since each ResourceFinder now only has one path.

Minor changes

  • Files#getLocalFileFromUrl(URL) decodes url before returning file
  • WizardStep header labels encode their model values by default, override WizardStep#getHeader() if you need the old behavior (i.e. model values not encoded)
  • IErrorMessageSource#substitute(Map<String,Object>) was merged into IErrorMessageSource#getMessage(String, Map<String,Object>)
  • org.apache.wicket.util.resource.IResourceStreamWriter#write() now works again with java.io.OutputStream as in Wicket 1.4.x. WICKET-4601