The org.zkoss.xel.VariableResolver interface"

From Documentation
m (correct highlight (via JWB))
Line 10: Line 10:
 
ZK will instantiate an instance of the given class for each page, so the variable resolver is no need to be thread safe.
 
ZK will instantiate an instance of the given class for each page, so the variable resolver is no need to be thread safe.
  
This feature is useful for tools and utilities to provide the default variable resolvers (aka., implicit variables). A tool can specify the listeners in <tt>metainfo/zk/config.xml</tt> (locatable by the class loader) -- not just in <tt>WEB-INF/zk.xml</tt>.
+
This feature is useful for tools and utilities to provide the default variable resolvers (aka., implicit variables). A tool can specify the listeners in <code>metainfo/zk/config.xml</code> (locatable by the class loader) -- not just in <code>WEB-INF/zk.xml</code>.
  
 
'''Instantiation:'''
 
'''Instantiation:'''

Revision as of 10:21, 19 January 2022


DocumentationZK Configuration Referencezk.xmlThe listener ElementThe org.zkoss.xel.VariableResolver interface
The org.zkoss.xel.VariableResolver interface


Listener:

org.zkoss.xel.VariableResolver
[since 5.0.4]

A listener could implement VariableResolver, and then it will be used as the default variable resolver of each page. In other words, the variable resolver defined will be available to all pages. It is also called the system-level variable resolver.

ZK will instantiate an instance of the given class for each page, so the variable resolver is no need to be thread safe.

This feature is useful for tools and utilities to provide the default variable resolvers (aka., implicit variables). A tool can specify the listeners in metainfo/zk/config.xml (locatable by the class loader) -- not just in WEB-INF/zk.xml.

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.



Last Update : 2022/01/19

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