GitHub

User guide

Building web applications with Apache Wicket 10 and 11.

Start here

Five lessons that build one application, from an empty project to a tested page with Ajax.

  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. 5 tutorials2 how-to guides4 reference2 explanation
  • Components and markup Pages, panels, borders and fragments, and how Java components meet their HTML. 13 how-to guides1 reference2 explanation
  • Models How components get and keep their data. 5 how-to guides1 reference1 explanation
  • Forms Input fields, validation, conversion, uploads and submitting. 11 how-to guides2 reference1 explanation
  • Lists and tables Repeat markup for each item in a list, page through data. 4 how-to guides1 reference
  • Ajax and JavaScript Update parts of a page without reloading it, and work with JavaScript. 9 how-to guides2 reference1 explanation
  • WebSockets Push updates from the server to the browser. 2 how-to guides1 reference1 explanation
  • Links and URLs Link between pages, pass parameters and shape the URLs. 7 how-to guides1 reference1 explanation
  • Resources Serve CSS, JavaScript, images and generated files. 14 how-to guides1 reference1 explanation
  • Pages and state Stateful and stateless pages, the page store and the session. 3 how-to guides2 explanation
  • Requests and lifecycle How a request is processed and what happens to a component along the way. 4 how-to guides2 reference1 explanation
  • Localization Translate texts, formats and choices. 4 how-to guides1 reference1 explanation
  • Security Log users in, restrict access and harden the application. 7 how-to guides2 reference1 explanation
  • Testing Test pages, forms and markup without a browser. 4 how-to guides1 reference
  • Integration Spring, CDI, EJB, OSGi and monitoring. 7 how-to guides1 reference

Look it up

  • A–Z indexEvery Wicket class the guide 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.

Older versions

The guide covers the release lines in service. Pages marked with a version, like Wicket 11+, need that version or later. For lines out of service, use their single-page guide: Wicket 9, Wicket 8, Wicket 7.