I just performed the 1.2 release of WicketStuff HTML Validator, thanks to Emond Papegaaij, a Topicus Onderwijs co-worker. This new release adds the ability to ignore Wicket specific bugs when using the & entity in JavaScript calls, and adds the ability to ignore <input type=”text” autocomplete=”false” /> validation errors. Even though you specify that your document is (X)HTML compliant, browsers will (fortunately) still work with these validation errors present.
The markup validator was featured in my presentation “Get your Wicket Application in production (and keep your weekends free)”. The validator will notify you if you have invalid HTML markup in your rendered pages. While usually not destructive, having invalid markup can result in long debugging errors when replacing part of your page with for example Ajax, or traversing the DOM.
You can use it by adding the HtmlValidationResponseFilter to the Wicket
request cycle filters in the following fashion:
public class MyApplication extends WebApplication { // ... @Override protected void init() { // only enable the markup filter in DEVELOPMENT mode if(DEVELOPMENT.equals(getConfigurationType())) { HtmlValidationResponseFilter htmlvalidator = new HtmlValidationResponseFilter(); htmlvalidator.setIgnoreAutocomplete(true); htmlvalidator.setIgnoreKnownWicketBugs(true); getRequestCycleSettings() .addResponseFilter(htmlvalidator); } } }
And you’re all set. Make sure you define a XHTML doctype in your pages, such
as:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Foo</title>
</head>
<body>
</body>
</html>To use the HtmlValidator, include the following in your project’s pom:
<dependency> <groupId>org.wicketstuff</groupId> <artifactId>htmlvalidator</artifactId> <version>1.2</version> <scope>test</scope> </dependency>
You might need to add the Wicket Stuff maven repository to your repository list.
With this book, Wicket will become the greatest territory the Dutch have settled since Manhattan.
Nathan Hamblen
Senior Software Engineer, Teachscape Inc.
This is the complete and authoritative guide to Wicket, written and reviewed by the core members of the Apache Wicket team. If there's anything you want to know about Wicket, you are sure to find it in this book.
Jonathan Locke
Founder and Architect of Apache Wicket, Foreword Wicket in Action
Without question, Wicket in Action... is the be-all and end-all when it comes to Wicket.
Geertjan Wielenga, Wicket Netbeans Plugin Author
The tutorial and conversational tone of the writing makes the book very approachable.
Nick Heudecker
System Mobile
Loved the sample application—it tied everything together.
Phil Hanna
Senior Software Developer, SAS Institute
The essential guide for learning and using Wicket.
Erik van Oosten
Lead programmer and Project Manager, JTeam
Finally, the Web Framework of web frameworks, Apache Wicket, now has a bible of its own.
Per Ejeklint
Senior Software Architect, Heimore group
Wicket is an innovative evolution of the MVC programming with simple roots, but without a primer such as this, it can be more challenging than it needs to be.
Brian Topping
Founder, Bill2 Inc.
Wicket In Action glues the areas of web development with Apache Wicket together and gives a great overview of Apache Wicket...it will make a great compendium.
Nino Martinez Wael
Java Specialist, Jayway Denmark