Creating custom tags is possible. To implement your custom tag you need to create an implementation of DynamicTag. Your dynamic tag can override any TagNode method to customize the way dynamic tag will be rendered. The most common use case would be converting a template snippet into its own tag. Lets say there is a template like the following that you want to reuse:
<form action="${form.action}" name="${
form.name}" method="${form.method}" enctype="${form.encType}">
<div a:foreach="form.inputs" a:as="input">
</div>
</form>
You would want to use this tag as follows:
<a:form form="yourFormObject"/>
You can create a FormTag class that extends DynamicTag that would render this. Of course you don't want to manually create the dom tree using the java api. You would want to use a template file as a helper. There comes the DynamicTagCreator helper class. This class can render any html snippet, create an instance of FormTag class for you which would contain all the nodes defined in this template snippet.
This exact example is available in the components module. Take a look at FormTag.java, FormTagProvider.java and form.html as an example on how to write your own custom tag.
I am back from my vacation now, I will create more complete examples/documentation over the weekend.
Erdinc