Parent Project
Project Documentation
Foundation

Migration from Tobago 1.0 to 1.5 (work in progress)

Tobago 1.5 has a lot of changes compared to Tobago 1.0.

The good news: Most of these changes are made internally in Tobago. If you use Tobago, you don't have to change too much.

The amount of things you have to change in your application depends on how do you use it. On the Tobago Tag Library are very few changes made. On the Tobago Java Classes are more changes. Here you can see which changes has been made.

Deprecated

There are also @Deprecated annotations in the code and some logging warning when using deprecated code via the Deprecation logging category. Before migrating you should check your application about that.

For the migration phase you may add the tobago-deprecation.jar as dependency to your project. It contains classes that has been moved (e. g. to the new internal package) or removed. So you can resolve any migration steps step by step. It is not recommended to use the tobago-deprecation.jar for production.

Internal

The new 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

deprecatedreplacement
tc:menuCheckboxtx:menuCheckbox
tc:menuItemtc:menuCommand

In tc:sheet the default for rows has been changed from 100 to 0, which means "unlimited".

For JSP and the tx: library all id attributes have to be renamed to fieldId. This is to adjust the JSP library to the Facelet library.

The tree tag tc:tree has changed comprehensive. Please check the documentation and demo examples.

The type attribute of commands has been removed. It is no longer needed, when using action, onclick or link.

Layout Manager

On of the basic changes in Tobago 1.5 is the reimplementation of the layout manager. The usage if it, has only been changed a bit. The most important is that the constraints will be set with the tc:gridLayoutConstraint tag. The tc:cell tag is deprecated now. Spans can be set directly into the component with the tc:gridLayoutConstraint tag.

The keyword "fixed" has been renamed to "auto".

UIComponent Classes

Some of the UIComponent classes has been renamed or restructured, to get a consistent naming schema. The used UIComponents where generated and have super classes with an "Abstract" as prefix.

 

old namenew name
dividedorg.apache.myfaces.tobago.component.UISelectOneorg.apache.myfaces.tobago.internal.component.AbstactUISelectOneBase
...

Other API Classes

old namenew name
movedorg.apache.myfaces.tobago.OnComponentCreatedorg.apache.myfaces.tobago.component.OnComponentCreated
movedorg.apache.myfaces.tobago.component.ComponentUtilorg.apache.myfaces.tobago.util.ComponentUtils
movedorg.apache.myfaces.tobago.renderkit.RenderUtilorg.apache.myfaces.tobago.renderkit.util.RenderUtils
renamedorg.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtilorg.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils
...

Themes and CSS

Note: This effects your application only, when you've written your own theme, or using this classes in a separate style file.

The basic changes in CSS are:

  1. Using CSS 2.1 compliant content box model instead of Quirks mode border box model.
  2. Changed HTML structure for some components.

    The CSS class name schema has been revised. See the JavaDoc of the Classes class to check the naming schema.

    old namenew name
    renamedtobago-tagName-defaulttobago-tagName
    renamedtobago-tagName-errortobago-tagName-markup-error
    renamedtree-junctiontobago-treeNode-junction
    renamedtree-*tobago-treeNode-*
    renamedtobago-input-pickertobago-datePicker-icon
    renamedtobago-textArea-*tobago-textarea-*