ZK 6: Upgrade Notes"

From Documentation
Line 23: Line 23:
 
==org.zkoss.zk.ui.util.Initiator is simplified==
 
==org.zkoss.zk.ui.util.Initiator is simplified==
  
The <tt>doAfterComposer</tt>, <tt>doCatch</tt> and <tt>doFinally</tt> methods are moved from <tt>org.zkoss.zk.ui.util.Initiator</tt> to <tt>org.zkoss.zk.ui.util.InitiatorExt</tt>. In other words, if you'd like to override any of these methods, your initiator has to implement both <tt>org.zkoss.zk.ui.util.Initiator</tt> and <tt>org.zkoss.zk.ui.util.InitiatorExt</tt>.
+
The <tt>org.zkoss.zk.ui.util.Initiator</tt> class now has only one method called <tt>doInit</tt>. The <tt>doAfterComposer</tt>, <tt>doCatch</tt> and <tt>doFinally</tt> methods are moved to <tt>org.zkoss.zk.ui.util.InitiatorExt</tt>. In other words, if you'd like to override any of these methods, your initiator has to implement both <tt>org.zkoss.zk.ui.util.Initiator</tt> and <tt>org.zkoss.zk.ui.util.InitiatorExt</tt>.
 +
 
 +
=API returns Iterable instead Iterator=
 +
 
 +
To use with Java 5's for statement, the return type of the following APIs are changed to <tt>java.lang.Iterable</tt>:
 +
 
 +
* <tt>org.zkoss.zk.ui.Exectuion</tt>: <tt>getHeaders</tt> and <tt>getHeaderNames</tt>
 +
* <tt>org.zkoss.zk.ui.WebApp</tt>: <tt>getInitParameterNames</tt>
 +
* <tt>org.zkoss.zk.ui.RichletConfig</tt>: <tt>getInitParameterNames</tt>
  
 
=API that are deprecated=
 
=API that are deprecated=

Revision as of 02:25, 14 November 2011

ZK 6: Upgrade Notes

Author
ZK Team, Potix Corporation
Date
November 15, 2011
Version
ZK 6

Overview

In additions to new features, ZK 6 also cleans up some API that are confusing, redundant or over complicated. The effort to upgrade depends on what features your application uses. Many of them shall run without modification. It is suggested to re-compile the applications and replace the code that use the deprecated API.

Upgrade addons

Here is a list of addons that you have to upgrade:

API that are changed

org.zkoss.zk.zul.api.* are removed

The component's API interfaces (org.zkoss.zk.ui.api.*, org.zkoss.zul.api.*...) are removed[1] Please replace them with the concrete classes. For example, use org.zkoss.zul.Window instead of org.zkoss.zul.api.Window.

Template:References

org.zkoss.zk.ui.util.Initiator is simplified

The org.zkoss.zk.ui.util.Initiator class now has only one method called doInit. The doAfterComposer, doCatch and doFinally methods are moved to org.zkoss.zk.ui.util.InitiatorExt. In other words, if you'd like to override any of these methods, your initiator has to implement both org.zkoss.zk.ui.util.Initiator and org.zkoss.zk.ui.util.InitiatorExt.

API returns Iterable instead Iterator

To use with Java 5's for statement, the return type of the following APIs are changed to java.lang.Iterable:

  • org.zkoss.zk.ui.Exectuion: getHeaders and getHeaderNames
  • org.zkoss.zk.ui.WebApp: getInitParameterNames
  • org.zkoss.zk.ui.RichletConfig: getInitParameterNames

API that are deprecated

CSS and Theme

Comments



Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.


  1. The reason to remove them is they cause more confusion than the abstraction benefit, and they are costly to maintain.