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 _javascript_Support 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 references 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).
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
Release Note
Release Notes - Tapestry 5 - Version 5.3.0
Sub-task
- [TAP5-1433] - Remove deprecated methods of PerthreadManager service
- [TAP5-1434] - Remove old IOCSymbols class, and outdated constants from IOCConstants
- [TAP5-1435] - Remove proxy-related building method from ClassFabUtils, since moved to ClassFactory#createProxy()
- [TAP5-1436] - Remove @ApplicationState annotation, replaced with @SessionState
- [TAP5-1437] - Remove @IncludeJavaScriptLibrary and @IncludeStylesheet annotations, replaced by @Import
- [TAP5-1438] - Remove OptimizedApplicationStateObject, replaced with OptimizedSessionStateObject
- [TAP5-1439] - Remove PrimaryKeyEncoder (replaced by ValueEncoder)
- [TAP5-1440] - Remove "validateForm" event triggered by Form component (replaced with "validate" event)
- [TAP5-1441] - Remove ValidationMessagesSource, replaced with ComponentMessagesSource
- [TAP5-1455] - Remove code and constants related to page pooling
- [TAP5-1456] - Remove symbol for absolute URIs (now always absolute since 5.2)
- [TAP5-1457] - Remove SCRIPTS_AT_TOP from SymbolConstants
- [TAP5-1459] - Remove AbstractField.createDefaultParameterBinding() and AbstractTextField.defaultValue()
- [TAP5-1460] - Remove deprecated constants from FormInjector
- [TAP5-1461] - Remove Loop.volatile parameter (replaced with formState parameter in 5.1)
- [TAP5-1462] - Remove Element.getParent()
- [TAP5-1463] - Remove EndTagStyle.OMIT
- [TAP5-1464] - Remove ClasspathAssetAliasManager.toResourcePath()
- [TAP5-1465] - Remove Environment.getAccess()
- [TAP5-1466] - Remove deprecated methods from TapestryTestCase
- [TAP5-1467] - Remove deprecated methods from ClassTransformation
Bug
- [TAP5-35] - During an Ajax update, using a "var:" binding prefix causes an exception indicating that the page is not rendering
- [TAP5-763] - Documentation for RenderSupport.addScriptLink() is invalid about where the included links go
- [TAP5-875] - BigTypesFormatter should allow for plain space as a grouping separator since FF2 replaces non-breaking space character \u00A0 (grouping separator for Sweden, Finland , etc) with normal space \u0020
- [TAP5-922] - Allow a null or blank value to be supplied in Link.addParameter(), and render out the parameter name with the missing value
- [TAP5-998] - Exception when a form element component is not enclosed by a Form is odd: uses the form's label to identify the component in question
- [TAP5-1146] - In a Multi-Zone update, if the identified Zone does not exist, the content is silently dropped (should log an error to the client-side console)
- [TAP5-1257] - _javascript_ error with IE Prototype still in 1.7
- [TAP5-1372] - BaseURLSource uses getLocalPort() rather than getServerPort()
- [TAP5-1374] - Quickstart layout component uses deprecated IncludeStyleSheet annotation
- [TAP5-1383] - TypeCoercer should "promote" coercions to primitive types into coercions to the corresponding wrapper type
- [TAP5-1393] - Form component shoould push the BeanValidationContext into the Environment only after onPrepare()
- [TAP5-1418] - Image submits do not set the _javascript_ submitting element value.
- [TAP5-1422] - java.util.ConcurrentModificationException when shutting down jmx server
- [TAP5-1429] - PageTester does not call registry.performRegistryStartup or TapestryAppInitializer.announceStartup
- [TAP5-1444] - Index pages in subfolders should have precedence over start pages
- [TAP5-1491] - In Chrome the buttons in the Palette component do not appear greyed-out when disabled
- [TAP5-1510] - The @Advise annotation limits advice to just a specific interface type
- [TAP5-1527] - BeanEditForm loses object found by onPrepare() during render
Improvement
- [TAP5-98] - The TypeCoercer should be able to coerce String to Enum types, even without a specific contribution
- [TAP5-683] - The Tapestry object should include an info() for logging to the console (as it already includes error(), debug(), etc.)
- [TAP5-741] - CSS files should be automatically minimalized, like _javascript_ files
- [TAP5-853] - Move away from Javassist
- [TAP5-1040] - Allow HTML5 doctype to be printed
- [TAP5-1208] - In development mode, Tapestry should "shadow" field & parameter values to instance variables, to assist with debugging
- [TAP5-1320] - ServiceActivity improvements
- [TAP5-1323] - Change Quickstart Template to Match New Site Design
- [TAP5-1348] - Component report should accept multiple root packages
- [TAP5-1356] - When contributing to a service configuration, values should be coerced to the correct type rather than rejected if not the correct type
- [TAP5-1361] - Tapestry should include a coercion from Flow to List
- [TAP5-1362] - Tapestry should provide coercions from String to JSONObject and JSONArray
- [TAP5-1378] - Allow Delegate component to be used for creating in-template components
- [TAP5-1382] - Tapestry should provide a coercion from Flow to boolean, that evaluates to true if the Flow is not empty
- [TAP5-1389] - Access properties of generic page and component fields
- [TAP5-1390] - Functional programming improvements
- [TAP5-1396] - Invocation class should provide access to the annotations placed on the method beeing invoked
- [TAP5-1414] - Add HOSTNAME symbol to SymbolConstants, use in BaseUrlSource
- [TAP5-1419] - Tapestry tests should be able to be run from more than just Jetty
- [TAP5-1431] - Quickstart should enable the Blackbird client-side console
- [TAP5-1450] - Component report should print information about deprecated components or deprecated parameters
- [TAP5-1458] - Mark tapestry.suppress-redirect-from-action-requests as deprecated, for removal in Tapestry 5.4
- [TAP5-1469] - Allow for multiple application root packages by contributing additional LibraryMappings with empty virtual folder
- [TAP5-1473] - Running integration tests with Tomcat6Runner it should be possible to configure the application under test by providing a local context.xml file
- [TAP5-1482] - Upgrade Prototype to 1.7 / Scriptaculous 1.9.0
- [TAP5-1492] - New features for SeleniumTestCase
- [TAP5-1495] - Tapestry's property _expression_ language should support map creation
- [TAP5-1496] - Link components should support easily adding request parameters to the generated link
- [TAP5-1519] - Ensure that all calls to invoke methods and constructors with dependencies are tracked with the OperationTracker
- [TAP5-1521] - _javascript_Support.addInitializerCall() should support JSONArray of function parameters, as RenderSupport does
- [TAP5-1538] - Optimize client-side URL rebuilding in IE 7
- [TAP5-1539] - Optimize document scans used by Tapestry.FieldEventManager to not locate the label or icon until actually needed
New Feature
- [TAP5-71] - Add a Tree component in corelib
- [TAP5-73] - _javascript_ libraries should be automatically packed/minimalized
- [TAP5-742] - Add optional component tracing comments to rendered output
- [TAP5-1385] - Provide support for JSR-330
- [TAP5-1472] - Provide basic integration with JPA 2
- [TAP5-1502] - Make it easier to create _javascript_ Stacks using a standard implementation with an OrderedConfiguration
- [TAP5-1528] - Tapestry-specific JavaDoc plugin that generates parameter documentation, etc.
- [TAP5-1542] - Support for skinning/theming Tapestry pages
- [TAP5-1543] - Introduce Tapestry schema in version 5_3
- [TAP5-1550] - Provide a multiple selection component that renders check boxes for available selection options
Task
- [TAP5-116] - Replace Maven build with Gradle build
- [TAP5-973] - Identify and fix the issue that causes intermittent build failures
- [TAP5-1286] - Remove Maven APT files for documentation that has moved into the Confluence wiki
- [TAP5-1397] - Remove Tutorial source from SVN
- [TAP5-1402] - Remove deprecated Alias service (which was replaced in 5.1 with the simpler ServiceOverride service)
- [TAP5-1432] - Remove classes and methods deprecated in Tapestry 5.2
Test
- [TAP5-1413] - Test to make sure the ability to give a multizoneupdate a String rather than a zone works