About

This module contains a proof of concept (POC) of Wicket support. It is similar to the JSF tag lib, but tags are defined in Java wicket pages, keeping the html code clean.

Features

Tag Wicket Component Status
includeTemplate WATTemplate Partial page , name
includeParam WATParam Partial name is the only attribute supported
includeBlock WATBlock Partial page , name , parseAbsoluteUrls , provider
error WATError Partial errorCode . Can be used w/ WATTemplate and WATBlock

Usage

Template and parameters are defined in the Page object, using containers :

public ExamplePage(final PageParameters parameters) {
	// Define template
	WATTemplate template = new WATTemplate("watTemplate", "/template.html");
	add(template);

	// Define Parameter 'main'
	WATParam mainBlock = new WATParam("wat-main", "main");
	template.add(mainBlock);

	// All content must be added in the 'mainBlock' container.

	// Add a label
	mainBlock.add(new Label("message", "If you see this message wicket and WAT are properly configured and running"));
}
			

HTML code only uses divs :

<div wicket:id="watTemplate"  xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
	<div wicket:id="wat-main" >
		<h1>WAT / Wicket Demo</h1>
		<span wicket:id="message">message will be here</span>
	</div>
</div> 
			

Feedback

All feedback is welcome, please use the tracker or the mailing list on sourceforge.