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

Compare with Current View Page History

« Previous Version 8 Next »

Migrating to Wicket 1.5

Environment

  • Wicket 1.5 requires at least Java 5

Upgraded to JUNIT4

We changed the root pom.xml to use junit4 (4.7)

Removed deprecated method, class and interface definitions

In order to keep the code clean, we removed all methods, classes and interfaces which were marked deprecated in 1.4 already.

Removed FormComponent.setPersistence()

WICKET-2213: At the very beginning of Wicket we introduced FormComponent.setPersistence() with the idea to make creating Login panels very easy. Basically Wicket would deal with the Cookie handling for the login details. Now some years later it is evident that this feature is not very useful:

  • It basically is used for login panels only
  • Even in our examples Password.setPersistence is false which means that "rememberMe" doesn't really work. Only the user name is stored in a Cookie
  • Forcing formComponent.getPageRelativePath() as the Cookie name is too restrictive
  • You can not combine username and password into a single Cookie and e.g. decrypt it for safety reasons

So we removed that feature and introduced IAuthenticationStrategy. A default implementation has been provided and the examples have been updated. As usual it gets registered with ISecuritySettings.

In case you want to implement your own IAuthenticationStrategy, a utility class org.apache.wicket.util.cookies.CookieUtils has been added.

Removed IComponentBorder

The interface has been removed since IBehavior can do exactly the same. MarkupComponentBorder has been migrated, which means you can associated markup to the behavior. Markup which will surround the behavior's component.

Component.getStyle() implementation changed

getStyle() used to return Component.getVariation() + "_" + style. That eventually caused issue such as mentioned in WICKET-2298.

We changed that to getStyle() now returning style only which as a consequence required us to change all resource related APIs to add variation. To migrate your code you maight either provide component.getVariation() or null where not relevant.

  • No labels