Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some existing methods of JavaScriptSupport were changed from returning void, to returning the JavaScriptSupport instance, to allow for chaining of calls. This interface is consumed by end-user code, but not generally implemented by end-user code.

Breaking Features

ClassFactory Removed

Tapestry's use of the Javassist bytecode library has been completely removed, along with many related services, such as ClassFactory, that were deprecated in 5.3. Use PlasticProxyFactory instead.

Injected Scripts at Bottom

In prior versions of Tapestry, JavaScript libraries injected into the page (via the <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">@Import</a> annotation, or via <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptSupport.html">JavaScriptSupport</a>), were injected into the <head> element of the HTML page, either at the end of the element, or before any existing <script> element.

With this release, the <script> tags now occur at the bottom of the <body> tag. This may affect a small number of JavaScript libraries, such as <a href="http://www.google.com/analytics/">Google Analytics</a> that need to be placed at the top of the page; in those cases, the library should be added to your application's main layout component, instead of relying on @Import and JavaScriptSupport.

No Redirect On Form Validation Errors

...

In prior versions of Tapestry, all instance fields of components had to be visibility private; starting with versions 5.3.2 and 5.4, this has been relaxed. Component fields may be protected, or package private (that is, no visibility modifier). Fields that are final, or annotated with @Retain may even be public. In any case, this makes it easier for pages to work with other pages in the same package, and for subclasses to more easily access the fields (including parameter fields, or injections) provided by base classes. This feature should be used with care, as it can lead to designs that are more difficult to maintain.

JavaScript Modules

Prior releases of Tapestry primarily organized client-side logic in terms of JavaScript libraries. These libraries can be declaratively imported into the page (either during a full-page render, or during an Ajax partial page update). In addition, libraries can be combined together into stacks, which (in a production application) are combined into a single virtual asset.

The library approach is fundamentally limited in a number of ways, including namespace pollution and dealing with dependencies between libraries. Tapestry 5.4 introduces a parallel mechanism, based on RequireJS and the Asynchronous Module Definition as a way to speed up initial page load and organize client-side JavaScript in a more expressive and maintainable way.

Wiki Markup
{scrollbar}