O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tapestry 5: Building Web Applications

Book Description

In Detail This book is a practical step-by-step tutorial for those who want to build contemporary, real-life web applications with Tapestry 5, the Apache open-source framework for creating dynamic, robust, highly scalable web applications in Java. It shows the path of least resistance, so that the reader can learn all the essential skills quickly and easily. To give the reader an initial practical experience, a simple but useful web application is built throughout the chapters. Who this book is written for? This book is for those who want to build sophisticated Java web applications quickly and easily. It assumes that the reader is reasonably comfortable with the Java programming language, but no knowledge of web technologies is needed. For experienced Servlet, JSP, or Struts developers, the book will show an alternative way that will allow them to raise their productivity to an incomparable level. With this book you will see that a contemporary component-based framework can be easy to learn and a pleasure to work with.

Table of Contents

  1. Tapestry 5
  2. Credits
  3. About the Author
  4. About the Reviewers
  5. Preface
    1. What This Book Covers
    2. Who is This Book for
    3. Conventions
    4. Reader Feedback
    5. Customer Support
      1. Downloading the Example Code for the Book
      2. Errata
      3. Questions
  6. Foreword
  7. 1. Introduction to Tapestry
    1. Why is Tapestry Special?
      1. Tapestry HTML Templates are Free from Obtrusive Instrumentation
      2. Custom Components are Very Easy to Create
      3. AJAX and DHTML, but No JavaScript Coding
      4. User Input Validation Works Like Magic
      5. Built-In Internationalization Support
      6. Inversion of Control Made Easy
    2. Is Tapestry the Savior in the World of Java Web Development?
      1. The Journey of Tapestry from 3 to 5
    3. Summary
  8. 2. Creating Your Working Environment
    1. Install a JDK
      1. Configuring the Environment for Windows
      2. Configuring environment for Mac OS X
    2. Install Maven
      1. Create a Skeleton Tapestry project
    3. Install NetBeans
      1. Debugging in NetBeans
    4. Installing Eclipse
    5. Installing Tomcat
    6. Configuring the Project in Eclipse
      1. Debugging in Eclipse
    7. Summary
  9. 3. The Foundations of Tapestry
    1. Tapestry Application is a Set of Interactive Pages
    2. Page Template and Page Class
    3. Using Expansions
    4. Using Components
    5. Passing a Value Between Pages
    6. What Can be Returned From an Event Handler
    7. Tapestry Pages are Pooled
    8. Making a Page Field Persistent
    9. Using Page Activation Context
    10. Different Ways of Defining Components
    11. Structuring the Application
    12. Creating and Using an Application State Object
    13. Was an ASO Already Instantiated?
    14. Summary
  10. 4. Simple Components
    1. Celebrity Collector Project
    2. The Auxiliary Classes
    3. TextField, PasswordField and PageLink
    4. Limiting Access to a Page
    5. Loop, Output and DirectLink
    6. Another Use of PageLink Component
    7. Radio and RadioGroup
    8. Using Enumerations for Radio Component Values
    9. Prefixes: prop and literal
    10. The If and Checkbox Components
    11. Submit Component
    12. More Than One Submit Button
    13. Select Component
    14. Configuring an Application State Object
    15. Summary
  11. 5. Advanced Components
    1. Grid Component
    2. Tweaking the Grid
    3. Changing the Column Titles
    4. Using GridDataSource
    5. BeanEditForm Component
    6. Tweaking BeanEditForm
    7. DateField Component
    8. Changing the Styles of Grid and BeanEditForm
    9. FCKEditor Component
    10. Summary
  12. 6. User Input Validation
    1. Adding Validation to Components
    2. Validators
    3. Providing Custom Error Messages
    4. Handling Validation-Related Form Events
    5. Cross-Form Validation
    6. BeanEditForm Validation
    7. Summary
  13. 7. Internationalization and Localization
    1. Internationalization on the Java Platform
    2. Internationalization in Tapestry
    3. Creating and Using Message Catalogs
    4. Providing a German Message Catalog
    5. Switching Locale
    6. Internationalization of Images
    7. Using Localized Templates
    8. Other Examples of Internationalization
    9. Summary
  14. 8. Creating Custom Components
    1. How to Create a Tapestry 5 Component
    2. Creating the Border Component
    3. Adding a Navigation Menu
    4. Using a Parameter
    5. Unleashing the Power of Select Component
    6. Creating an OptionModel
    7. Creating a SelectModel
    8. Creating a ValueEncoder
    9. Selecting a Celebrity
    10. DateInput Component
    11. Making DateInput a Field
    12. Adding Simple Validation
    13. Creating a Universal Locale Switcher
    14. Creating a Custom Service
    15. Creating a Library of Custom Components
    16. Summary
  15. A. The Basics of Java for the Web
    1. The Standard Structure of a Java Web Application
    2. The Basics of the Deployment Descriptor
    3. WAR Files Basics
    4. About Java-Enabled Servers
  16. B. Creating a Real Data Source with db4o
    1. Preparing the Database
    2. The Main Operations
    3. The Final Strokes
  17. C. Where to Go Next