Release Notes 5.4Page edited by Howard M. Lewis ShipChanges (3)
Full ContentThis is the consolidated list of changes between Tapestry versions 5.3 and 5.4. To upgrade to 5.4, most users who are not using deprecated features will be able to just update the dependency version in their Maven POM file or Gradle build script (or download the new JAR files) and the new version will just work. However, please read carefully below before upgrading, and also review the How to Upgrade instructions. Incompatible APIs_javascript_SupportSome existing methods of _javascript_Support were changed from returning void, to returning the _javascript_Support instance, to allow for chaining of calls. This interface is consumed by end-user code, but not generally implemented by end-user code. Breaking FeaturesClassFactory RemovedTapestry'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 BottomIn prior versions of Tapestry, _javascript_ libraries injected into the page (via the @Import annotation, or via _javascript_Support), 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 Tapestry integrates with RequireJS to dynamically load libraries. This may affect a small number of _javascript_ libraries, such as Google Analytics that need to be placed at the top of the page; in those cases, the library should be added to the template of your application's main layout component, instead of relying on @Import and _javascript_Support. No Redirect On Form Validation ErrorsIn prior releases of Tapestry, when a client-side form was submitted and there were server-side validation errors, Tapestry would perform a redirect-after-post to re-render the page; this meant that the ValidationTracker object that stores validation errors would, itself, need to persist to the new render request, causing a server-side session to be created. Starting in 5.4, the default behavior for server-side validation exceptions is to re-render the page content immediately, within the same request; this obviates the need to use a persistent field to store the tracker. New FeaturesComponent field visibilityIn 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_ ModulesPrior 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.
Change Notification Preferences
View Online
|
View Changes
|
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
- [CONF] Apache Tapestry > Release Notes 5.4 confluence
