Documentation

Building web applications with Apache Wicket 10.

The reference guide (formerly the User Guide), one page per release line: Wicket 10 LTS · Wicket 9 · Wicket 8 · Wicket 7 · PDF and Javadoc

These pages cover Wicket 10. On an older line, use its reference guide.

Start here

Five lessons that build one application, from an empty project to a tested page with Ajax. To get a running project in a minute first, use the quick start.

  1. Build your first application Generate a project from the quickstart, run it, and build a home page with a label, a click counter and a link to a second page.
  2. Give every page the same layout Move the header, navigation and footer of your application into a base page and two panels, so every page shares one layout.
  3. Build a form that saves data Add a guestbook page with a form that validates its input, saves entries and lists them, and shows errors and a confirmation.
  4. Update a page with Ajax Make the click counter and the guestbook form update only the parts of the page that change, open the form without a reload, and refresh the guestbook every ten seconds.
  5. Test a page with WicketTester Write JUnit tests that render your pages, click links, submit the guestbook form and check Ajax updates, without a browser or a server.

Topics

Each topic gathers its lessons, how-to guides, reference and explanation on one page.

  • Getting started Create a project, configure the application and learn what Wicket is made of.
  • Components and markup Pages, panels, borders and fragments, and how Java components meet their HTML.
  • Models How components get and keep their data.
  • Forms Input fields, validation, conversion, uploads and submitting.
  • Lists and tables Repeat markup for each item in a list, page through data.
  • Ajax and JavaScript Update parts of a page without reloading it, and work with JavaScript.
  • WebSockets Push updates from the server to the browser.
  • Links and URLs Link between pages, pass parameters and shape the URLs.
  • Resources Serve CSS, JavaScript, images and generated files.
  • Pages and state Stateful and stateless pages, the page store and the session.
  • Requests and lifecycle How a request is processed and what happens to a component along the way.
  • Localization Translate texts, formats and choices.
  • Security Log users in, restrict access and harden the application.
  • Testing Test pages, forms and markup without a browser.
  • Integration Spring, CDI, EJB, OSGi and monitoring.

Or list every page of one kind: tutorials, how-to guides, reference, explanation.

Look it up

  • A–Z indexEvery Wicket class the documentation explains, and every page by title.
  • Wicket tags and attributesEvery tag and attribute in the wicket namespace, what it does, which attributes it takes, with a minimal example of each.
  • Component lifecycleThe stages a component goes through and every hook method Wicket calls on it, in order, with who calls it and when.
  • Form componentsEvery form, input, choice, upload and submit component in wicket-core and wicket-extensions, with the markup tag it needs and the type of its model.
  • Model classesEvery model class and model interface in wicket-core, the default methods of IModel, the factory methods and the component methods that work with models.
  • Header itemsEvery header item type with its factory methods, the tag it renders and where it ends up, the rendering order, Ajax behaviour and the header response decorators.
  • GlossaryPlain-English definitions of the Wicket terms used in this guide, each compared with what other web frameworks call it.

Reference guide and Javadoc

The reference guide is the complete Wicket user guide of one release line, in a single document to read through or search. The Javadoc lists every class, method and setting; Maven downloads the sources with every release, so your IDE also shows it when you hover over a class.

Release line Reference guide Javadoc
Wicket 10 LTS In service One page, Wicket 10 · PDF, Wicket 10 Javadoc for Wicket 10
Wicket 9 Last release coming One page, Wicket 9 · PDF, Wicket 9 Javadoc for Wicket 9
Wicket 8 Last release coming One page, Wicket 8 · PDF, Wicket 8 Javadoc for Wicket 8
Wicket 7 End of life One page, Wicket 7 · PDF, Wicket 7 Javadoc for Wicket 7

Upgrading

Every major release has a migration guide on the wiki with the API changes and what to do about them, linked from its release line page. The upgrade paths show the route from a line that is ending or has ended to one that is supported.

Books, courses, talks and the libraries the community builds on Wicket are on Learn Wicket.