Tapestry User's Guide Howard Lewis Ship Tapestry User's Guide Howard Lewis Ship Copyright © 2003-2004 The Apache Software Foundation

Table of Contents

1. Introduction ...... 1 An overview of Tapestry ...... 1 Pages and components ...... 2 Engines, services and friends ...... 3 Object Graph Navigation Language ...... 3 2. Page and component templates ...... 5 Template locations ...... 5 Template Contents ...... 5 Components in templates ...... 6 Component bodies ...... 7 Component ids ...... 8 Specifying parameters ...... 8 Formal and informal parameters ...... 9 Template directives ...... 10 Localization ...... 10 $remove$ jwcid ...... 11 $content$ jwcid ...... 13 3. Creating Tapestry components ...... 15 Introduction ...... 15 Component Specifications ...... 17 Coding components ...... 17 Component Parameters ...... 18 Using Bindings ...... 20 Connected Parameter Properties ...... 21 Component Libraries ...... 23 Referencing Library Components ...... 24 Library component search path ...... 24 Using Private Assets ...... 25 Library Specifications ...... 25 Libraries and Namespaces ...... 26 4. Managing server-side state ...... 27 Understanding servlet state ...... 27 Engine ...... 28 Visit object ...... 28 Global object ...... 29 Persistent page properties ...... 30 Implementing persistent page properties manually ...... 32 Manual persistent component properties ...... 34 Stateless applications ...... 35 5. Configuring Tapestry ...... 36 Requirements ...... 36 Web deployment descriptor ...... 36 Configuration Search Path ...... 38 Application extensions ...... 40 Character Sets ...... 41 A. Tapestry Object Properties ...... 43 B. Tapestry JAR files ...... 47 . Tapestry Specification DTDs ...... 48 element ...... 48 element ...... 49 element ...... 50 element ...... 51 element ...... 51

iv Tapestry User's Guide

element ...... 52 element ...... 53 element ...... 54 element ...... 54 element ...... 55 element ...... 55 element ...... 56 element ...... 56 element ...... 57 element ...... 57 element ...... 57 element ...... 58 element ...... 58 element ...... 59 element ...... 61 element ...... 61 element ...... 62 element ...... 63 element ...... 63 element ...... 64 element ...... 64 element ...... 65 . Tapestry Script Specification DTD ...... 66 element ...... 66 element ...... 66 element ...... 67 element ...... 67 element ...... 68 element ...... 68 element ...... 68 element ...... 69