| Foreword | xvii |
| Preface | xix |
| Acknowledgments | xxi |
| About this book | xxiii |
| About the title | xxvii |
| About the cover illustration | xxviii |
Part 1 | Getting started with Tapestry | 1 |
1 | Introducing Tapestry | 3 |
1.1 | What are web applications? | 5 |
1.2 | What are Java servlets? | 7 |
1.3 | Why do we need Tapestry? | 16 |
1.4 | Understanding Tapestry's goals | 22 |
1.5 | How does Tapestry work? | 25 |
1.6 | Using Spindle | 35 |
1.7 | Summary | 37 |
2 | Getting started with Tapestry | 38 |
2.1 | Introducing the Hangman application | 39 |
2.2 | Developing the Home page | 51 |
2.3 | Implementing the Home page using standard servlets | 62 |
2.4 | Developing the Guess page | 65 |
2.5 | Developing the Win and Lose pages | 89 |
2.6 | Configuring the web.xml deployment descriptor | 89 |
2.7 | Summary | 91 |
3 | Tapestry and HTML forms | 92 |
3.1 | Understanding HTML forms | 93 |
3.2 | Creating a simple login form | 96 |
3.3 | Understanding the Form component | 103 |
3.4 | Using basic form control components | 109 |
3.5 | Creating a to-do list | 120 |
3.6 | Summary | 132 |
4 | Advanced form components | 133 |
4.1 | Introducing the advanced form components | 134 |
4.2 | Creating drop-down lists with PropertySelection | 134 |
4.3 | Recording data in the form with Hidden | 148 |
4.4 | Looping within a form using ListEdit | 151 |
4.5 | Handling file uploads | 160 |
4.6 | Creating pop-up date selections using DatePicker | 165 |
4.7 | Summary | 168 |
5 | Form input validation | 169 |
5.1 | Validating user input | 170 |
5.2 | Building the Register page | 179 |
5.3 | Validating input based on regular expressions | 195 |
5.4 | Customizing label and field decorations | 199 |
5.5 | Enabling client-side validation | 202 |
5.6 | Handling form-level validations | 205 |
5.7 | Using validation without ValidField | 208 |
5.8 | Summary | 211 |
Part 2 | Creating Tapestry Components | 213 |
6 | Creating reusable components | 215 |
6.1 | Creating simple template components | 216 |
6.2 | Creating the component specification | 219 |
6.3 | Creating the Digit and Scaffold components | 230 |
6.4 | Creating the Letter component | 234 |
6.5 | Building the Spell component | 238 |
6.6 | Building the Border component | 242 |
6.7 | Creating interactive, reusable components | 246 |
6.8 | Using component libraries | 254 |
6.9 | Packaging components into libraries | 261 |
6.10 | Summary | 268 |
7 | Tapestry under the hood | 269 |
7.1 | Processing requests | 270 |
7.2 | Understanding the application servlet | 271 |
7.3 | Understanding the Tapestry engine | 277 |
7.4 | Understanding engine services | 279 |
7.5 | Page rendering in detail | 291 |
7.6 | Loading and pooling pages | 299 |
7.7 | Using persistent page properties | 306 |
7.8 | Using specified properties | 308 |
7.9 | Localizing Tapestry applications | 309 |
7.10 | Summary | 321 |
8 | Advanced techniques | 322 |
8.1 | Creating new engine services | 323 |
8.2 | Client-side scripting | 339 |
8.3 | Integrating with JavaServer Pages | 369 |
8.4 | Summary | 379 |
Part 3 | Building complete Tapestry applications | 381 |
9 | Putting it all together | 383 |
9.1 | Introducing the Virtual Library | 384 |
9.2 | Performing searches | 385 |
9.3 | Logging in and registering | 388 |
9.4 | Borrowing books | 389 |
9.5 | Getting details about books and persons | 390 |
9.6 | Managing your books | 393 |
9.7 | Administering the Virtual Library | 399 |
9.8 | Summary | 402 |
10 | Implementing a Tapestry application | 403 |
10.1 | Looking at the application layers | 404 |
10.2 | Organizing EJB access | 406 |
10.3 | Implementing the Search page | 413 |
10.4 | Implementing the BookMatches page | 419 |
10.5 | Implementing the Browser component | 430 |
10.6 | Implementing the ColumnSorter component | 434 |
10.7 | Implementing the Border component | 438 |
10.8 | Authenticating the user | 445 |
10.9 | Creating bookmarkable links | 449 |
10.10 | Editing a Book | 457 |
10.11 | Giving books away | 463 |
10.12 | Editing the publishers | 464 |
10.13 | Editing the list of users | 470 |
10.14 | Creating the web deployment descriptor | 474 |
10.15 | Wrapping it all up | 477 |
Appendix A | Getting involved with Tapestry | 479 |
Appendix B | Building the examples with Ant | 485 |
Appendix C | Tapestry component reference | 493 |
Appendix D | Tapestry specifications | 516 |
| Index | 537 |