
Apache Wicket is a simple and features rich component-based web framework, the real reusable components is the main selling point of this framework. However, due to the big different between component-based and MVC architecture, it makes Wicket hard to learn, especially for those classic MVC developers.
In this tutorials, it providing many step by step examples and explanations on using Apache Wicket 1.4.
Basic & Configuration
Wicket hello world, basic stuff and URL configuration.
- Wicket Hello World Example
A simple hello world to explore the basic structure of Wicket web application. - Setup Wicket examples in local enviroment
Setup a cloned Wicket example site in your local development environment for quick reference. - PageParameters example
Learn how to pass parameters to another page. - Make Wicket URL bookmarkablePage Structure friendly
By default, Wicket generated URL is ugly, here is a way to make the URL more neat and friendly. - Encrypts URL in Wicket
Easy way to encrypt URLs in Wicket.
Model
Wicket model examples, to bind from components to object property, and vise verse.
- PropertyModel example
Uses PropertyModel to bind form components to object property. - CompoundPropertyModel example
Uses CompoundPropertyModel to bind form components to object property.
Form Components
Wicket form component examples.
- Textbox example
Uses TextField to render a username textbox, and attached a simple username validator. - Password field example
Uses PasswordTextField to render password field, and attached a strong password validator. - Textarea example
Uses TextArea to render a multi-lines address field. - Checkbox example
Uses Checkbox to render checkbox, and checked it by default. - Multiple checkboxes example
Uses CheckBoxMultipleChoice to render multiple checkboxes. - Radio buttons example
Uses RadioChoice to render a group of radio buttons. - Single select listbox example
Uses ListChoice to render a single select scrollable list. - Multi select listbox example
Uses ListMultipleChoice to render a multi select scrollable list. - Dropdown box example
Uses DropDownChoice to render a dropdown box options. - File upload example
Uses FileUploadField to render a file upload componenet. - Select and SelectOption example
Wicket extensions – uses “Select” and “SelectOption” to render a dropdown box, which group related options with <optgroup> tags. - Palette example
Wicket extension – uses “Palette” to render two select boxes, and allow user to move items from one select box into another.
Validators
Custom validator in Wicket.
- Create a custom validator
Example to create a custom validator. - Custom NotEqualInputValidator
Another custom validator to make sure two components are not equal.
Wicket Integration
Integrate Wicket with others.
- Wicket + Spring integration example
Example to integrate Wicket with Spring framework easily. - Wicket + Kaptcha integration example
Example to integrate Kaptcha with Wicket framework, via Spring. - Wicket + Log4j integration example
How to integrate log4j with Wicket, via slf4j-log4j bridge binding.
FAQs
Some common FAQs in Wicket.
- Change the html file location in Wicket
For some reasons, you want to separate java and html file into different folder, here are few ways to do it. - Get ServletContext in Wicket
ServletContext is useful to provide web information, show you how to get it in Wicket. - Change Wicket to deployment mode
Two ways to change Wicket from development mode to deployment mode. - Call Javscript after AJAX update
Show you how to run a Javascript code after ajax updated. - FileUpload validator is ignored
If no file is selected, FileUpload validator will not execute! solution. - Configure 404 error page in Wicket
How to configure a 404 error page for not found url. - Get root context of web application
Common way to get root context of your Wicket project. - Detect if browser supports JavaScript or Ajax
Wicket way to detect if browser supports JavaScript or Ajax - Add attribute to a HTML tag dynamically
Example to manipulate attribute in a HTML tag dynamically. - AjaxLazyLoadPanel in Wicket
Example to use AjaxLazyLoadPanel to enable the lazy load effect.
Common Errors
Some common error messages in Wicket.
- java.lang.ClassNotFoundException : org.slf4j.impl.StaticLoggerBinder
- Enable debug messages for org.apache.wicket.util.resource
Wicket References
- Apache Wicket official website
- Apache Wicket examples
- Apache Wicket Wiki documtation
- Apache Wicket APIs JavaDocs
What’s Next?
To study more topics on Wicket frameworks, I recommend below two great Wicket books.


Pingback: Christmas fireplace Video()
Pingback: Christmas fireplace Video()
Pingback: used gun safe()
Pingback: Inbound Tour Operator UK()
Pingback: online casino betting()
Pingback: Our site()
Pingback: hanukkah dates()
Pingback: voyance gratuite en ligne()
Pingback: Full Report()
Pingback: Related Site()
Pingback: Key Finders()