How to get started
In order to quickly get up to speed on Tapestry 5, there are numerous information sources besides this Wiki available:
Tapestry site and Component reference if you are using latest release
Tapestry site and Component reference if you are using current SNAPSHOT
- Search the mailing list with Google by including Google entry: "YOUR KEYWORDS T5 site:mail-archives.apache.org/mod_mbox/tapestry-users/"
Home site, with deeper explanations of all the aspects behind Tapestry
Tapestry 5 Training - Tapestry 5 overview with practical work
Tapestry 5 Blogs - A list of blogs dealing with Tapestry 5
Preparing your development environment
Useful configurations for development - Tapestry 5 configurations that will make your development easier
Setting up NetBeans, Maven, Jetty for live class and template reloading
Create a skeleton Tapestry 5 project and run it (Eclipse, Maven, m2eclipse)
Using Eclipse JSP Editor and custom tld file for code completion
How to contribute
Code snippets
Selection Objects
Tapestry5DisplayableSelectionModel - A selection model for objects that implement an interface. Used for select components and more.
Tapestry5SelectObject - An alternative implementation of the Select core component based on the Daniel Jue's GenericSelectionModel and GenericValueEncoder classes.
Tapestry5MultipleSelectOnObjects - Explains how to build a multiple select component based on Daniel Jue's GenericValueEncoder classes.
Tapestry5HowtoSelectWithObjects - another example on how to make <SELECT> filled with objects
Tapestry5AnotherSelectWithObjects - One more example with on how to make <SELECT> on objects, now with annotations.
Inversion of Control (IOC)
Tapestry5HowToIocOnly - Example of using tapestry-oc standalone (without web part). And the same, but with tapestry-hibernate added Tapestry5HowToIocAndHibernate
Tapestry5HowToCreateADispatcher - How to create a completely transparent access control system by implementing a Dispatcher.
Tapestry5HowToCreateADispatcher2 - A supplemental article showing how to access request-specific data (ASOs) from a singleton service. To demonstrate we expand on the code shown in the first article.
Tapestry5HowToDecorateService - An example of a simple service decorator
Binding Prefixes
Bindings are used in templates ${message:myMessageKey} or as attribute to components <t:mycomponent value="literal:Hello world"/> to access message in resource bundles, properties, pass String literals and many more. The following pages explain how to write your own bindings.
Tapestry5HowToAddBindingPrefix - An example of a list: binding prefix. Useful for Action/Event/!PageLink context etc.
Tapestry5HowToAddMapBindingPrefix - An example of a map: binding prefix. Useful for supplying key=value pairs to components.
Tapestry5HowToAddBindingPrefixCycle - An example of an cycle: binding prefix. Makes zebra effect simple to do <t:grid .... rowClass="cycle:line1,line2">
Tapestry5HowToAddMessageFormatBindingPrefix - Describes how to add a messageformat prefix for specifying values for use in messages inline.
Localization
Tapestry5HowToDomainLevelLocalization - An example of how to overwrite the Locale domain-dependent
General
Tapestry5HowToFormatDateTimeEtc - How to format Date, Time, timestamps, Decimals, Numbers, Currencies
Tapestry5LocalizedDateField - How to create a localized DateField for BeanModel.
Tapestry5OutputtingRawHtml - How to output raw, unfiltered HTML
Tapestry5LinkingToNonTapestryURIs - How to link to non-Tapestry URIs (useful for Acegi integration)
Tapestry5ObtainingHttpServletRequest - How to obtain the HttpServletRequest, HttpServletResponse and HttpSession if you really need them
Tapestry5HowToCreateAPropertyEditBlock - Explains how to create a property editor and contribute it to the BeanEditForm.
Tapestry5HowToUseForms - Examples of how forms are connected to methods in your code.
Tapestry5ExceptionPage - How to display your own exception page.
Tapestry5RedirectException - Redirect to another URL from anywhere inside a page or component.
Tapestry5HowToChangeLocale - Change the locale of the user.
Tapestry5HowToIncludeJavaScript - Explains how to add your own custom JavaScript functions.
Tapestry5HowToIntegrateJQuery - Include jQuery and it's plugins to spice up your pages!
Tapestry5How_to_make_a_basic_crud show you how easy is the conception of a CRUD cycle with Tapestry 5
Tapestry5HowToRunTaskInThread - run a task (Runnable) in a separate thread
Tapestry5HowToWorkQueue - run multiple task through a WorkQueue with one or more threads
Tapestry5HowToUsePersistentFieldStrategy - How to create a PersistentFieldStrategy for the Persist annotation. working cookie example
Tapestry5HowToAddValidators - How to add your own validators to tapestry
Tapestry5HowToXhtml - How to override the default markup model to always use XHTML compliant tags
Tapestry5HowToReadSymbolsFromPropertiesFile - How to have symbols coming from a properties file and how to use them in your pages/components
Tapestry5HowToUseTapestryForCustomErrorPages - How to serve a custom 404 page, or other error, using Tapestry
Tapestry5HowToWebappFullPath - How to get the real path of the webapp directory.
Tapestry5HowToReadAFileFromContext - How a service reads a file from web app context folder
Tapestry5HowToUseTapestryTest - How to actually use Tapestry test
Tapestry5HowToVisualizeComponentHierarchy - How to visualize the component hierarchy just on your pages in the browser
Streaming Data
Tapestry5HowToCreatePieChartsInAPage - An example of dynamic charts inside a page (Using StreamResponse)
Tapestry5HowToCreateASimpleGraphComponent - An example of simple pie chart component (Using StreamResponse)
Tapestry5HowToCreateADynamicPDF - A simple example of how to return a dynamically generated PDF from an event (Using StreamResponse)
Tapestry5HowToStreamAnExistingBinaryFile - A simple example of how to stream an existing file, like an image. (Using StreamResponse)
Integration with other web frameworks
Spring
Tapestry5SpringIntegration - How to inject Spring beans into Tapestry pages and components
Tapestry51SpringJpaIntegration - Quick tutorial on using Tapestry with Spring Transactions and JPA
Tapestry5_How_To_Integrate_Components_With_Spring_Transactions - brief tutorial of how to integrate Tapestry5 components with Spring transactions.
Tapestry5-TestWithTapestry-Spring - How to test Tapestry pages which use Spring Beans
Google Web Toolkit (GWT)
Tapestry5GWTIntegration - An example based heavily on Pär Dahlberg's blog example on http://www.pmdit.se/blog, with generalized design tips.
Adobe Flash
Tapestry5 Adobe Flash integration - Explains how to create reusable Tapestry components which render swf's
Authentication and Authorization related
How to use T5 with Acegi Security and CAS - Francois Armand explains how he combines T5, Acegi Security and CAS (A Central Authentication Service, providing intranet single sign-on).
Tapestry5Acegi How to secure Tapestry5 pages with Java5 annotations using the Acegi security framework
Tapestry5AcegiNoAnnotations How to use Acegi Security with Tapestry 5, in the classical way (no annotations, some XML)
Tapestry5HowToControlAccess - Another supplemental article based on Tapestry5HowToCreateADispatcher2 showing how to control access to pages based on an annotation.
Tapestry5HowToSecureWithAcegiAndLDAP - How to protect you application using Acegi and LDAP
Tapestry5HowToSecureWithSpringAndLDAP - How to protect you application using Spring Security and LDAP
Tapestry5HowToSpringSecurityAndOpenId - How to provide OpenID authentication to your clients using tapestry-spring-security
Tapestry5HowToMitigateLoginAttacks - How to track failed logins and mitigate brute force or dictionary attacks
Security related
Security is the condition of being protected against danger, loss, and criminals.
Tapestry5CSRF - How to protect against 'Cross-site request forgeries' (CSRF)
Tapestry5PreventClientSideChanges - How to protect server side generated values against client side changes using a HMAC
Hibernate related
Tapestry5HowToUseTapestryHibernate - Example/Tutorial of how to use Tapestry-Hibernate in your code.
[Tapestry5HowToIocAndHibernate] - Example of using tapestry-oc+tapestry-hibernate standalone (without web part).
Tapstry5First_project_with_Tapestry5,_Spring_and_Hibernate - A translation of a french article about integrating Spring, Hibernate and Tapestry
Tapestry5ManipulateClassesAtRuntime show you how easy is to add class methodes at runtime.
Tapestry5HibernateGridDatasource simple hibernated grid datasource using HQL (Hibernate Query Language).
Tapestry5HibernateGridDatasource2 simple hibernated grid datasource using hibernate criteria API.
Tapestry5HibernateGridDatasource3 very flexible abstract GridDataSource for using any org.hibernate.Query object, so you can use HQL, SQL, Criteria, DaO, etc.
Tapestry5BrainlessEntityTimestamping How to have entities automatically time stamped using tapestry-hibernate, simply by adding certain fields!
Tapestry5AvoidingLazyInitializationExceptions How to avoid "Lazy Initialization" exceptions
Tapestry5AvoidingDifferentObjectWithSameIDExceptions How to avoid "Different Object with same ID" exceptions
Components
Tapestry5CheckOutTheSourceCode - Examples and Demos of many components in the source code, like the Palette, Grid, BeanEditForm, etc.
Tapestry5HowToCreateYourOwnComponents - Creating your own components is really simple, and fun to do as well. (This example implements a www.dhtmlgoodies.com drag-and-drop-folder tree component)
Tapestry5HowToCreateYourOwnComponentLibrary - Steps to create a reusable library (JAR) of T5 components.
Tapestry5OutputLocaleNumber - Creating a new component for formatting (numbers) according to locale, using literals (integer, decimal or currency). It's based on Output component.
Tapestry5HowToCreateATabPanel - Explains how to create a tab panel.
Tapestry5SubmitContextComponent - A Submit component that passes a context
Tapestry5SubmitContextWithNavigationComponent - A Submit component that passes a context and allows event handler to return navigational object.
Tapestry5AnyComponent - A deprecated but still useful component that does ... nothing (by default)
Tapestry5ImageComponent - Another deprecated component that's useful for making "previewable" templates
Tapestry 5 components By Shing Hing Man
Several projects with Tapestry 5 components at Google Code, share your components here.
Tapestry5TreeComponent - A tree component based on DHTMLgoodies.com's drag 'n drop folder tree
Tapestry5EnhancedPalette - Based heavily on the existing core palette and uses Matt Kruse's Option Transfer javascript (Works in IE!)
Tapestry5Layoutcomponent A sophisticated Layout component
Tapestry5PaletteEvents How to invoke a Javascript function when the selected items are added/removed/reordered in a Palette
Tapestry5GridComponent Some tricks using the Grid component
Tapestry5AndJavaScriptExplained - A detailed look at how Tapestry 5 integrates javascript into your application. In this article we create a mixin for adding a javascript confirmation box to link components, explaining each step. Full source included.
Tapestry5SimpleAndPowerfulLayouts - Creates flexible layouts, using a simple reusable component.
Tapestry5LayoutWithMenu - Layout with added menu bar
Tapestry5EnumAsComponentParameter - Defining a new enum as a component parameter, and adding the string -> enum type coercion for it
Bug workarounds / patches
Tapestry5Utf8Encoding - How to use UTF-8 encoding to support foreign characters
Tapestry5RootPathEmptyResponse - A runtime patch for the root path empty response bug
HowToRunTapestry5OnJBoss5 - How to run Tapestry 5 on JBoss 5
Meta info
Tapestry5HowToCreateYourQuickstartWithMaven206 - If you've had some trouble getting maven2.0.6 to compile the quickstart, here's how to do it.
Tapestry5WhereToStoreExternalResources - Where to store resources like CSS, JS and Images in your application
Tapestry5WhereToStoreConfigurationResources - Where to store resources like Hibernate configuration files, logging properties, and web application context information in your application
Tapestry5HowToSearchTheMailingLists - Force Google to only search the mailing list (results found in these lists are often hidden due to the limited #links)
Tapestry5HowToOverrideTheDefaultErrorMessageBanner - How to override the default error message banner
Tapestry5Trolls - How to deal with trolls on the list, and one in particular
Coding traps
Tapestry5HowToNotMakeCustomComponent - If you are making a custom component, there are few things you shouldn't do...
Tapestry5ComponentClassResolverError - When organizing your component (or page) directories, pay special attention!
Tapestry5Caveats - or more literally, "let him beware".
IRC
Chris Lewis mentioned Tapestry's IRC: #tapestry AT irc.freenode.net: "There's usually 5 ~ 8 of us in there, and we work/talk about Tapestry."
Please add more 'how tos'. Remember to prefix the page name with Tapestry5.