Print
1. Introduction to the X2TP

The tapestry plugin is under heavy development, and will be a lot better than the old XDoclet counterpart.

You need to be aware of few things to get started with it :

  1. It's based on Tapestry 4, older versions are not officially supported
  2. Can generate .page and .jwc files not .application descriptors
  3. It's made of three main kinds of tags
  • plain tags for DTD-compliant configuration files (eg components, bindings, etc)
  • shortcut tags for framework components generation (eg Insert, For, Form, etc)
  • shortcut tags for contrib components generation (eg TreeView, Table, etc)
  • You can still generate descriptors for third party components using the plain tags but eventually specific tags will be created for common used libraries such as Tacos.

Shortcut tags will allow you to save many lines on writing your doc, for example this .page file:

<page-specification class="test.SamplePage">
  <description>my Sample Page :-)</description>
  <component type="PageLink" id="component1">
    <binding name="page" value="Page1"/>
    <binding name="renderer" value="beans.bean1"/>
  </component>
</page-specification>

Can be generated by:

test/SamplePage.java
/** 
 * @tapestry.page-specification description="my Sample Page :-)"
 *
 * @tapestry.component id="component1" type="PageLink"
 * @tapestry.binding component-id="component1" name="page" value="Page1"
 * @tapestry.binding component-id="component1" name="renderer" value="beans.bean1"
 */
public abstract class SamplePage extends BasePage {
    ...
}

or even better by a shotcut tag:

test/SamplePage.java
/** 
 * @tapestry.page-specification description="my Sample Page :-)"
 *
 * @tapestry.page-link id="component1" page="Page1" renderer="beans.bean1"
 */
public abstract class SamplePage extends BasePage {
    ...
}
Powered by Atlassian Confluence