GitHub

User guide

Links and URLs

Link between pages, pass parameters and shape the URLs.

How-to guides

Directions for a specific goal.

  • Pass parameters to a page Put values in the URL of a page with PageParameters, read them in the page constructor and convert them to the types you need.
  • Link to a page Navigate to another page with a Link that runs code on the server first, or with a BookmarkablePageLink that points straight at the page.
  • Turn plain links into page links with wicket:link Write ordinary anchors to page files in the markup and let wicket:link turn them into links to bookmarkable pages, without Java code.
  • Link to another site Render a link to a URL outside your application with ExternalLink, build the URL from a model, and redirect to another site from code.
  • Use links on stateless pages Handle clicks on a stateless page with StatelessLink and keep the state the click needs in page parameters, because every click builds a new page.
  • Give pages readable URLs Mount pages on paths of your choice, put page parameters in path segments with placeholders, and mount a whole package at once.
  • Encrypt URLs Wicket 11+ Hide class names and component paths behind encrypted URLs with CryptoMapper, and choose where the key lives so that stateless pages keep working.

Reference

The classes, tags and settings, described.

  • Request mappers The request mappers that turn URLs into request handlers and back, the mount methods of WebApplication, and the syntax of mount paths.

Explanation

Why Wicket works the way it does.

  • Redirects after a request Why Wicket answers a form submit or link click with a redirect, how the three render strategies differ, and what that means for stateless pages and clusters.