Tapestry Developer's Guide

Howard Lewis Ship


Table of Contents

1. Introduction
Scripting vs. Components
Interaction
Security
Web Applications
Features
2. JavaBeans and Properties
JavaBeans
JavaBeans Properties
Property Paths
Object Graph Navigation Library
3. Tapestry Components
Parameters and Bindings
Connected Parameters
Formal vs. Informal Parameters
Embedded Components
HTML Templates
Localizing sections of a template
Components with Bodies
Tapestry and HTML Production
Implicitly removed bodies
Explicitly removed bodies
Limiting template content
Limits
Localization
Localization with Strings
Localization with Templates
Assets
Helper Beans
4. Tapestry Pages
Page State
Persistent Page State
EJB Page Properties
Dynamic Page State
Stale Links and the Browser Back Button
Page Loading and Pooling
Page Localization
Page Buffering
Page Events
5. Application Engines and Services
Application Servlet
Required Pages
Server-Side State
Stateful vs. Stateless
Engine Services
Logging
Private Assets
6. Understanding the Request Cycle
Service URLs and query parameters
Page service
Action and Direct listeners
Direct service
Action service
Services and forms
7. Designing Tapestry Applications
Persistent Storage Strategy
Identify Pages and Page Flow
Identify Common Logic
Identify Engine Services
Identify Common Components
8. Coding Tapestry Applications
Application Engine
Visit Object
Operating Stateless
Enterprise JavaBeans Support
Page classes
9. Designing new components
Choosing a base class
Parameters and Bindings
Persistent Component State
Component Assets
10. Tapestry and JavaScript
The Body component
Script Specifications and Script Components
11. The Tapestry Inspector
Specification View
Template View
Properties View
Engine View
Logging View
A. Tapestry JAR files
B. Tapestry Specification DTDs
<application> element
<bean> element
<binding> element
<configure> element
<component> element
<component-alias> element
<component-specification> element
<context-asset> element
<description> element
<extension> element
<external-asset> element
<field-binding> element
<inherited-binding> element
<library> element
<library-specification> element
<page> element
<page-specification> element
<parameter> element
<private-asset> element
<property> element
<reserved-parameter> element
<service> element
<set-property> element
<set-string-property> element
<static-binding> element
<string-binding> element
C. Tapestry Script Specification DTD
<body> element
<foreach> element
<if> element
<if-not> element
<include-script> element
<initialization> element
<input-symbol> element
<let> element
<script> element
<set> element

List of Figures

4.1. Page Lifecycle
4.2. Page Loading Sequence
4.3. Page Render Sequence
4.4. Page Rewind Sequence
4.5. Page Detach Sequence
5.1. ApplicationServlet Sequence
5.2. Services and Gestures
6.1. Page Service Sequence
6.2. Direct Service Sequence
6.3. Action Service Sequence
10.1. Body Component Rendering Sequence
11.1. Inspector - Specification View
11.2. Inspector - Template View
11.3. Inspector - Properties View
11.4. Inspector - Engine View
11.5. Inspector - Logging View
B.1. <application> Attributes
B.2. <application> Elements
B.3. <bean> Attributes
B.4. <bean> Elements
B.5. <binding> Attributes
B.6. <configure> Attributes
B.7. <component> Attributes
B.8. <component> Elements
B.9. <component-alias> Attributes
B.10. <component-specification> Attributes
B.11. <component-specification> Elements
B.12. <context-asset> Attributes
B.13. <description> element
B.14. <extension> Attributes
B.15. <component-specification> Elements
B.16. <external-asset> Attributes
B.17. <field-binding> Attributes
B.18. <inherited-binding> Attributes
B.19. <library> Attributes
B.20. <library-specification> Elements
B.21. <page> Attributes
B.22. <page-specification> Attributes
B.23. <page-specification> Elements
B.24. <parameter> Attributes
B.25. <private-asset> Attributes
B.26. <property> Attributes
B.27. <reserved-parameter> Attributes
B.28. <service> Attributes
B.29. <set-property> Attributes
B.30. <set-string-property> Attributes
B.31. <static-binding> Attributes
B.32. <string-binding> Attributes
C.1. <body> Elements
C.2. <foreach> Attributes
C.3. <foreach> Elements
C.4. <if> Attributes
C.5. <if> Elements
C.6. <if-not> Attributes
C.7. <if-not> Elements
C.8. <include-script> Attributes
C.9. <initialization> Elements
C.10. <input-symbol> Attributes
C.11. <let> Attributes
C.12. <let> Elements
C.13. <script> Elements
C.14. <set> Attributes

List of Tables

5.1. Tapestry Pages
B.1. Tapestry Specifications

List of Examples

2.1. JavaBeans getter method
2.2. JavaBeans setter method
2.3. JavaBeans getter method (boolean)
2.4. Lazy evaulation of JavaBeans property
2.5. Synthesized JavaBeans Property
3.1. Connected Parameter - Specification
3.2. Connected Parameter - Java Code
4.1. HTML template for Shopping Cart
4.2. Shopping Cart Specification (excerpt)
4.3. Listener method for remove component
5.1. Web Deployment Descriptor
10.1. Traditional JavaScript usage