Wicket has a cool feature, where if you're on a page, and you've got a link to that same page, it will offer different markup to surround that page. This feature can be turned off by setting the autoEnable flag to false on the Link object. An example:

new BookmarkablePageLink("page", Page.class).setAutoEnable( false );

Or you may want to customize what gets marked up on your page by overriding afterDisabledLink and beforeDisabledLink.

You can also set a default behaviour across your entire application using ApplicationSettings.setDefaultBeforeDisabledLink(String text) and of course ApplicationSettings.setDefaultAfterDisabledLink(String text).

  • No labels