...
Table of Contents | ||||
---|---|---|---|---|
|
Breaking Changes
Some number of interfaces and APIs in Tapestry 5.3 will be removed in Tapestry 5.4 or later. These include:
- The "suppress redirects" functionality, which allows component event requests to respond directly with HTML, as in Tapestry 4
- The RenderSupport environmental (replaced with the JavaScriptSupport environmental)
- ClassFactory service and ClassFab interface (replaced with the PlasticProxyFactory service and PlasticClass interface)
Many classes and interfaces marked as deprecated in prior releases of Tapestry have been removed.
New Features
Rendering comments
It is now possible to have Tapestry emit rendering comments; these are comments (such as <!--BEGIN Index:loop (context:Index.tml, line 15)-->
) that can assist you in debugging markup output on the client-side. This is enabled for all requests using the configuration symbol tapestry.component-render-tracing-enabled
, and can be added to any request by adding the query parameter t:component-trace=true
to the URL. This will significantly increase the size of the rendered markup, but can be very helpful with complex layouts to determine which component was responsible for which portion of the rendered page.
Adaptable service contributions
When making contributions to a service, you are no longer restricted to contributing a value that is assignable to the type associated with the configuration; objects of any type may be contributed, and the TypeCoercer service is used to coerce the value to the configuration's type.
Component debugging improvements
Because of how Tapestry instruments your pages and components, it has been difficult to debug Tapestry applications; any mutable field shows its default value in the debugger, regardless of what has been written to the field or read out of it. In Tapestry 5.3, when in development mode, Tapestry now shadows values read from or written to such fields into the fields themselves (this has also been fixed in the 5.2.5 maintenance release). This does not occur in production, to avoid potential memory leaks.
Reloading disabled in production
Tapestry no longer checks for changes to Tapestry component class files, templates, or message catalogs in production mode. It is assumed that Tapestry applications are packaged as WAR files in production, and that changing the WAR file causes the servlet container to redeploy the entire application. This change is to improve throughput and reduce memory consumption in production applications.
String-to-Enum coercions
The TypeCoercer service now automatically generates String-to-Enum coercions without requiring a specific contribution. This coercion is case insensitive. A contribution is still allowed, and will take priority over the default coercion, but is only necessary to support "aliases" for enum values outside those defined by the enum type itself.
JavaScript and CSS minimization
A new optional library, tapestry-yuicompressor, has been added. This library adds support for compressing JavaScript libraries and CSS files using the YUICompressor library
ComponentClassTransformWorker Service
The type of this service has changed from ComponentClassTransformWorker to ComponentClassTransformWorker2. Contributions of type ComponentClassTransformWorker will automatically be coerced to the new ComponentClassTransformWorker2 interface. However, if you use the @Contribute annotation to mark the method that makes contributions, you will need to update the annotation to indicate the new service interface. If you followed the naming convention, and named your method contributeComponentClassTransformWorker()
, you don't need to change anything.
Tapestry JavaDoc
Tapestry now includes a new library, tapestry-javadoc, that replaces the old Maven-based component report. Simply by placing a @tapestrydoc annotation into your component's JavaDoc, Tapestry will generate complete documentation as part of JavaDoc ... no more switching back and forth, and no more reliance on Maven for component documentation.
Skinning / Theming Support
Tapestry now adds the ability to skin and/or theme your pages and components. Its an extension of how Tapestry manages pages per locale, but adds new application-defined axes along with rules to find the resources.
There's also a new Dynamic component, which uses an external template, not a Tapestry template, which can be chosen at runtime.
Tree Component
Tapestry finally has a proper Tree component for navigating hierarchical data. It's efficient and Ajax-enabled, and fully customizable.
Release Notes: Tapestry 5.3.0
...