Tapestry is designed for flexibility; this extends beyond simply configuration behavior, and encompasses actually replacing or augmenting behavior. In some cases, it is necessary to subclass framework classes in order to alter behavior, but in many cases, it is possible to use an application extension.
Application extensions are JavaBeans declared in the application specification using the <extension> element. Each extension consists of a name, a Java class to instantiate, and an optional configuration (that is, properties of the bean may be set). The framework has a finite number of extension points. If an extension bean with the correct name exists, it will be used at that extension point.
Each application extension must implement an interface particular to the extension point.
Application Extension Points
This extension is fit into the configuration property search path, after the servlet context, but before JVM system properties. A typical use would be to access some set of configuration properties stored in a database.
A request decoder is used to identify the actual server name, server port, scheme and request URI for the request. In some configurations, a firewall may invalidate the values provided by the actual HttpServletRequest (the values reflect the internal server forwarded to by the firewall, not the actual values used by the external client). A request decoder knows how to determine the actual values.
An object that is used to create IMonitor instances. Monitors are informed about key application events (such as loading a page) during the processing of a request.
The factory may create a new instance for the request, or may simply provide access to a shared instance.
If not specified, a default implementation is used (DefaultMonitorFactory).
An object which is used to find page and component specifications that are not located using the default search rules. The use of this is open-ended, but is generally useful in very advanced scenarios where specifications are stored externally (perhaps in a database), or constructed on the fly.
An object which is used to find page or component templates that are not located using the default search rules. The use of this is open-ended, but is generally useful in very advanced scenarios where templates are stored externally (perhaps in a database), or constructed on the fly.
Allows an alternate object to be responsible for decoding multipart requests (context type multipart/form-data, used for file uploads). Generally, this is used to configure an instance of DefaultMultipartDecoder with non-default values for the maximum upload size, threshold size (number of bytes before a temporary file is created to store the) and repository directory (where temporary files are stored).