blob: 1946cd623a82e047e0931a9c6f128eb8847071e8 [file] [log] [blame]
----
Upgrade Notes
----
Upgrade Notes
This is a quick guide to changes between releases of Tapestry. This is meant to provide information
on any additions or changes that developers will face after upgrading to the latest version of Tapestry.
It is always advised to perform a full and complete build after upgrading.
You should also check the {{{../release-notes.html}project-wide release notes}} for information
about bugs fixes and other improvements.
Release 5.0.12
* {{{https://issues.apache.org/jira/browse/TAPESTRY-2421}TAPESTRY-2421}}
To enable deployment compatibility between Tapestry 4 and Tapestry 5, a
small number of classes
had to be renamed or refactored.
PageRenderSupport has been renamed to just
{{{../apidocs/org/apache/tapestry5/RenderSupport.html}RenderSupport}}.
TapestryConstants has been removed, split into a number of new classes (by type), such as
{{{../apidocs/org/apache/tapestry5/SymbolConstants.html}SymbolConstants}}.
Likewise, TapestryUtils has been split into
{{{../apidocs/org/apache/tapestry5/MarkupUtils.html}MarkupUtils}} and
{{{../apidocs/org/apache/tapestry5/VersionUtils.html}VersionUtils}}.
Because of naming conflicts, several classes and interfaces were moved under an
org.apache.tapestry5 package:
* {{{../apidocs/org/apache/tapestry5/services/ApplicationInitializer.html}ApplicationInitializer}} and
{{{../apidocs/org/apache/tapestry5/services/ApplicationInitializerFilter.html}ApplicationInitializerFilter}}.
* {{{../apidocs/org/apache/tapestry5/services/ComponentMessagesSource.html}ComponentMessagesSource}}.
* {{{../apidocs/org/apache/tapestry5/services/RequestGlobals.html}RequestGlobals}}.
* {{{../apidocs/org/apache/tapestry5/json/JSONObject.html}JSONObject}} (and the other JSON classes).
[]
* TapestryModule
Many of the internal services of Tapestry have been split off into their own module,
{{{../apidocs/org/apache/tapestry5/internal/services/InternalModule.html}InternalModule}}.
This should not affect any user code.
* Form component
The default {{{../apidocs/org/apache/tapestry5/ValidationTracker.html}ValidationTracker}}
built into the Form component now has a persistence strategy of "flash". This means that
if you navigate away from a page with validation errors and return, you will lose the errors
To support this style of navigation, you will need to bind the Form's tracker parameter
to a field that has the correct persistency (most likely, "session", the previous persistence
strategy).
* Resource.openStream()
The methods <<<exists()>>> and <<<openStream()>>> were added to the
{{{../apidocs/org/apache/tapestry5/ioc/Resource.html}Resource}} interface. The semantics
of some of the other methods were slightly alterred.
* Loop element parameter
The Loop components' elementName parameter was renamed to simply element (to be consistent
with element parameters added to the Any and FormInjector components).
Release 5.0.11
* Field.getElementName()
The method <<<getElementName()>>> on interface {{{../apidocs/org/apache/tapestry5/Field.html}Field}}
was renamed to <<<getControlName()>>>. This brings the property in alignment with W3C documentation
and terminology, and helps differentiate from the element name (i.e., the tag name used to represent
the element in a component template).
This affects a number of existing components that implement the interface.
Method <<<allocateElementName()>>> on interface {{{../apidocs/org/apache/tapestry5/services/FormSupport.html}FormSupport}}
was likewise renamed to <<<allocateControlName()>>>.
* Zone
The show and hide parameters of the {{{ref/org/apache/tapestry5/corelib/components/Zone.html}Zone}}
component now have a default binding prefix of "literal".
In addition, the client-side Tapestry.ZoneEffect object was renamed to Tapestry.ElementEffect to reflect
that it can be used with elements that are not explicitly Zones.
* Validator.invokeIfBlank()
The method <<<invokeIfBlank()>>> on interface {{{../apidocs/org/apache/tapestry5/Validator.html}Validator}}
was renamed to <<<isRequired()>>>.
* MetaDataLocator
The <<findMeta()>> method on interface {{{../apidocs/org/apache/tapestry5/services/MetaDataLocator.html}MetaDataLocator}}
has changed significantly; it now expands symbols and performs type coercion.
* Grid Interfaces
The {{{../apidocs/org/apache/tapestry5/grid/GridModel.html}GridModel}} interface and
the <<<prepare()>>> method of
{{{../apidocs/org/apache/tapestry5/grid/GridDataSource.html}GridDataSource}} have changed to accommodate
the ability to sort using multiple columns.
* PropertyModel
The <<<getWidth()>>> method was removed from the
{{{../apidocs/org/apache/tapestry5/beaneditor/PropertyModel.java}PropertyModel}} interface; the logic
for deducing the desired field size from the @Width annotation has been moved into AbstractTextField.
* Grid, BeanEditForm, BeanEditor, BeanDisplay
The data type for boolean values has changed from "checkbox" (reflecting how it is rendered in an edit form) to "boolean"
(reflecting what it is). In addition, all numeric types are given the data type "number".
This will only affect your application if you provided an overriding contribution
to the {{{../apidocs/org/apache/tapestry5/services/BeanBlockSource.html}BeanBlockSource}} service.
* ExceptionInfo
The return type for <<<getStackTrace()>>> on
{{{../apidocs/org/apache/tapestry5/services/ExceptionInfo.html}ExceptionInfo}}
changed from List\<String\> to List\<StackTraceElement\>.
* ApplicationGlobals and RequestGlobals
The <store> methods on these two interfaces were renamed to be more explicit. These are not methods typically
invoked from user code.
* BeanModel
The <<<remove()>>> method of {{{../apidocs/org/apache/tapestry5/beaneditor/BeanModel.html}BeanModel}} was renamed
to <<<exclude()>>>, and a new method, <<<include()>>> was added. The <<remove>> parameter of BeanEditForm,
BeanEditor, BeanDisplay and Grid were all renamed to <<exclude>> as well (and a new <<include>> parameter was added
to each).