Above we simply say that when the 'div' tag is called on this library, it should create an instance
of 'org.metawidget.HtmlMetawidget', and then once created it should set the 'rendererType' attribute
to 'div'. We do the same thing with the 'table' tag, except we specify the table
renderer instead of the div one.
As can be seen you can start defining the tag just like in a gracelets view script,
no need to declare the common tag library namespaces. And you can do template inserting
so that it works just like a user tag source file.
If we used this then we would get the following results (before facelets sends it to the browser):
As can be seen above this special tag must be called 'proxy'. Inside that you can get the special
attribute called 'gracelet.TagName' which will return the name of the tag called on this library but that
did not exist. Here we use this so that when a developer makes a Wicket Gracelet Page as a wicket template
then he can easily use tag calls instead of having to escape the tags since a ':' in a tag name
is not pretty when writing gracelets scripts (i.e., form("wicket:id": "someid")). The following example
and the output it generates will demonstrate this (taken from the Guest Book example):
1 <?xml version="1.0"?> 2 <style>textarea { background-color: rgb(220,220,220); }</style><form>commentFormPlease add your comment here:<p><textarearows="10"cols="75">textThis is a comment</textarea></p><inputtype="submit"value="Submit"/></form><span>comments<p>Hello World<span>date1/1/2004</span><span>textComment text goes here</span></p></span><remove><p>1/1/2004<br/>More comment text here.</p></remove>