You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This is the consolidated list of changes between Tapestry versions 5.2 and 5.3. To upgrade from 5.1 to 5.2, most users will be able to just update the Maven dependency in their POM file (or download the new JAR file) and the new version will just work. However, please read carefully below before upgrading.

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.

Because of the upgrade to Prototype 1.7, existing JavaScript that uses value.toJSON() may break; replace with Object.toJSON(value).

New Features

User Alerts

Tapestry now has a central mechanism for handling user alerts; this includes the AlertManager service and the Alerts component. Just add an Alerts component to your application's standard layout component and Tapestry takes care of the rest. Alerts can be added during both traditional and Ajax requests, and may be transient (displayed for a few seconds), normal, or sticky (persist until the user expressly dismisses them). Alerts support three severities: info, warn(ing) and error; the look and feel can be customized by overriding Tapestry's default CSS rules.

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.

Form Cancelled Event

Form components now recognize when the client-side form was cancelled. A new "cancelled" event is triggered early in the submission process, which allows the page to bypass all property updates and input validations, when desired.

Implicit OrderedConfiguration Constraints

When using OrderedConfiguration.add() with no constraints, Tapestry will now implicitly order the added element after the previously added element, within the same method. In prior releases, such elements were added with no constraints. This makes it easier to contribute a group of related items with an implicit ordering.

New Component Class Validations

Tapestry includes new validations of component classes to help cut down on many common errors; Tapestry now checks that component ids referenced by an event handler method (the Fromcomponent id part of the method name) actually matches a component defined in the template ... this quickly identifies typos in method names. This check can be disabled with a configuration symbol, as existing 5.2 apps may have such errors and still operate (that is, they may have dead event handler methods that will never be invoked).

Application Folder

Tapestry can now be configured to execute inside a folder, which can be useful when running Tapestry inside a web application that contains other servlets or filters, as a way to prevent conflicts.

Removed Functionality

The integrated Blackbird client-side console has been removed. In its place are the floating console messages (used when Blackbird is disabled) combined with logging to the Firebug or WebKit console. This should make debugging client-side JavaScript much easier.

Release Notes: Tapestry 5.3.0

Unable to render {include} The included page could not be found.
  • No labels