The library-property Element"
m |
m |
||
Line 15: | Line 15: | ||
The library properties are shared by all Java codes that use the same set of ZK libraries. If you installed ZK libraries in WEB-INF/ib of a ZK application, the library properties are shared only within the application. | The library properties are shared by all Java codes that use the same set of ZK libraries. If you installed ZK libraries in WEB-INF/ib of a ZK application, the library properties are shared only within the application. | ||
− | The library properties are easier to access than the preferences since they are static members (of <javadoc>org.zkoss.lang.Library</javadoc>). However, their scope depends on the installation. | + | The library properties are easier to access than the preferences since they are static members (of <javadoc>org.zkoss.lang.Library</javadoc>). However, their scope depends on the installation. If you copy zcommon.jar to a folder that are shared by all applications, then the library properties are shared by all applications. If you copy it to WEB-INF/lib for a particular application, then the scope is limited to the application. |
For a list of supported library properties, please take a look at [[ZK Configuration Reference/zk.xml/The Library Properties | Library Properties]]. | For a list of supported library properties, please take a look at [[ZK Configuration Reference/zk.xml/The Library Properties | Library Properties]]. |
Revision as of 02:29, 7 December 2010
Syntax:
<library-property> <name>any name</name> <value>any value</value> </library-property>
Species a library-level property with the library-property element. The above example is equivalent to
org.zkoss.lang.Library.setProperty("any name", "any value");
The library properties are shared by all Java codes that use the same set of ZK libraries. If you installed ZK libraries in WEB-INF/ib of a ZK application, the library properties are shared only within the application.
The library properties are easier to access than the preferences since they are static members (of Library). However, their scope depends on the installation. If you copy zcommon.jar to a folder that are shared by all applications, then the library properties are shared by all applications. If you copy it to WEB-INF/lib for a particular application, then the scope is limited to the application.
For a list of supported library properties, please take a look at Library Properties.
Version History
Version | Date | Content |
---|---|---|