Template Contents

Tapestry templates contain a mix of the following elements:

Usually, about 90% of a template is ordinary HTML markup. Hidden inside that markup are particular tags that are placeholders for Tapestry components; these tags are recognized by the presence of the jwcid attribute. "JWC" is short for "Java Web Component", and was chosen as the "magic" attribute so as not to conflict with any real HTML attribute.

Tapestry's parser is quite flexible, accepting all kinds of invalid HTML markup. That is, attributes don't have to be quoted. Start and end tags don't have to balance. Case is ignored when matching start and end tags. Basically, the kind of ugly HTML you'll find "in the field" is accepted.

The goal is to allow you to preview your HTML templates using a WYSIWYG HTML editor (or even an ordinary web browser). The editor will ignore the undefined HTML attributes (such as jwcid).

A larger goal is to support real project teams: The special markup for Tapestry is unobtrusive, even invisible. This allows an HTML designer to work on a template without breaking the dynamic portions of it. This is completely unlike JSPs, where the changes to support dynamic output are extremelyobtrusive and result in a file that is meaningless to an HTML editor.