Migration from Tobago 1.5 to 1.6 (work in progress)
Tobago 1.6 has some API changes compared to Tobago 1.5.
The most changes are in the tree API, which is more easy to use, but also more flexible.
Java-API
The class org.apache.myfaces.tobago.model.TreeState which has been deprecated in 1.5.x is used in 1.6.x with a changed API. Please check the occurrences.
Class org.apache.myfaces.tobago.component.UIFileInput has been renamed to org.apache.myfaces.tobago.component.UIFile.
Facelets
Tobago 1.6.x is using Facelets 2.0. When still using Facelets 1.1 in the current application, this must be removed:
- Remove facelets JAR (e.g. jsf-facelets-1.1.14.jar) from the library.
- Remove <view-handler>org.apache.myfaces.tobago.internal.application.ViewHandlerImpl</view-handler> from the faces-config.xml
- Remove param javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER from web.xml
- Remove or replace the facelets.* entries from web.xml
Deprecated
There are also @Deprecated annotations in the code and some logging warning when using deprecated code via the Deprecation logging category. Before and after migrating you should check your application about that.
Internal
The internal package contains classes that should not be used directly in an application. This classes may change in minor revisions without announcement. Classes in the renderkit package a handled in the same manner.
Tag Library
The main changes in the tag library are
TODO: What has changed with the tree? The Tree now extends a UIData. The tc:treeData tag should longer used. The tc:treeNode has no longer the attributes: "selected", "expanded", "marked", "treeMarkedListener", "treeExpansionListener"
Deprecated facets "resizeAction" and "menupopup" was removed.
Configuration
To define an own theme, please use now a file tobago-config.xml instead of tobago-theme.xml. The content of tobago-theme.xml is a subset of the tobago-config.xml, you have only to change the root node.
Please use the tobago-config-1.6.xsd to validate the configuration.
JavaScript
Date/Time/Calendar components: The JavaScript for this components has been refactored. All method have now a namespace and are using jQuery. JavaScript code has been removed from the renderers. For data the HTML5 data attribute is used instead of directly coding it into the event handler, or using hidden input fields.