The org.zkoss.zk.ui.util.Initiator interface"

From Documentation
m
m
Line 6: Line 6:
 
  [since 5.0.7]
 
  [since 5.0.7]
  
A listener could implement <javadoc type="interface">org.zkoss.zk.ui.util.Initiator</javadoc> to handle the initialization of a ZUML page, as if it is specified in [[ZUML Reference/ZUML/Processing Instructions/init|the init directive]]. This kind of listeners is called system-level initiators.
+
A listener could implement <javadoc type="interface">org.zkoss.zk.ui.util.Initiator</javadoc> to handle the initialization of a ZUML page and richlets, as if it is specified in [[ZUML Reference/ZUML/Processing Instructions/init|the init directive]]. This kind of listeners is called system-level initiators.
  
 
Each time a ZK page is created, ZK will instantiate one instance for each registered system-level initiator and the invoke <javadoc method="doInit(org.zkoss.zk.ui.Page, java.util.Map)" type="interface">org.zkoss.zk.ui.util.Initiator</javadoc> and other methods.
 
Each time a ZK page is created, ZK will instantiate one instance for each registered system-level initiator and the invoke <javadoc method="doInit(org.zkoss.zk.ui.Page, java.util.Map)" type="interface">org.zkoss.zk.ui.util.Initiator</javadoc> and other methods.
Line 14: Line 14:
 
'''Instantiation:'''
 
'''Instantiation:'''
 
An independent instance of the given class is instantiated each time before the method is invoked. It means it is thread safe, and all information stored in non-static members will be lost after called.
 
An independent instance of the given class is instantiated each time before the method is invoked. It means it is thread safe, and all information stored in non-static members will be lost after called.
 +
 +
=Version History=
 +
{{LastUpdated}}
 +
{| border='1px' | width="100%"
 +
! Version !! Date !! Content
 +
|-
 +
| 5.0.8
 +
| July, 2011
 +
| The system-level initiators are applied to richlets too.
 +
|}
  
 
{{ZKConfigurationReferencePageFooter}}
 
{{ZKConfigurationReferencePageFooter}}

Revision as of 04:14, 28 July 2011


DocumentationZK Configuration Referencezk.xmlThe listener ElementThe org.zkoss.zk.ui.util.Initiator interface
The org.zkoss.zk.ui.util.Initiator interface


Listener:

org.zkoss.zk.ui.util.Initiator
[since 5.0.7]

A listener could implement Initiator to handle the initialization of a ZUML page and richlets, as if it is specified in the init directive. This kind of listeners is called system-level initiators.

Each time a ZK page is created, ZK will instantiate one instance for each registered system-level initiator and the invoke Initiator.doInit(Page, Map) and other methods.

If you want to process only certain pages, you can check the request path by calling Desktop.getRequestPath() (the desktop instance can be found thru the give component).

Instantiation: An independent instance of the given class is instantiated each time before the method is invoked. It means it is thread safe, and all information stored in non-static members will be lost after called.

Version History

Last Update : 2011/07/28


Version Date Content
5.0.8 July, 2011 The system-level initiators are applied to richlets too.



Last Update : 2011/07/28

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