The Preferences"

From Documentation
(Created page with "{{ZKConfigurationReferencePageHeader}} To define a preference, you can configure it in <code>WEB-INF/zk.xml</code>. [[ZK Configuration Reference/zk.xml/The preference Element | ...")
 
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{ZKConfigurationReferencePageHeader}}
 
{{ZKConfigurationReferencePageHeader}}
  
To define a preference, you can configure it in <code>WEB-INF/zk.xml</code>.
+
Here is a list of supported preferences that ZK recognizes.
[[ZK Configuration Reference/zk.xml/The preference Element | The preference Element]] for more information. For example,
+
 
 +
To define a preference, you can configure it in <code>WEB-INF/zk.xml</code><ref>For more information, please refer to [[ZK Configuration Reference/zk.xml/The preference Element | The preference Element]].</ref>. The preferences are similar to the library properties: they are application-specific name/value pairs. You could use them to configure your application and ZK engine. However, unlike the library properties, preferences are stored in <javadoc>org.zkoss.zk.ui.util.Configuration</javadoc> and can be retrieved by use of <javadoc method="getPreference(java.lang.String, java.lang.String)">org.zkoss.zk.ui.util.Configuration</javadoc>.
 +
 
 +
For example,
  
 
<source lang="xml">
 
<source lang="xml">
 
<preference>
 
<preference>
<name>org.zkoss.zul.Button.mold</name>
+
    <name>org.zkoss.zk.ui.WebApp.name</name>
<value>trendy</value>
+
    <value>My Killer Application</value>
 
</preference>
 
</preference>
 
</source>
 
</source>
  
Here is a list of built-in preferences that ZK recoginizes.
 
 
{{ZKConfigurationReferenceHeadingToc}}
 
{{ZKConfigurationReferenceHeadingToc}}
 +
 +
<blockquote>
 +
----
 +
<references/>
 +
</blockquote>
 +
 
{{ZKConfigurationReferencePageFooter}}
 
{{ZKConfigurationReferencePageFooter}}

Latest revision as of 02:41, 8 August 2011


The Preferences


Here is a list of supported preferences that ZK recognizes.

To define a preference, you can configure it in WEB-INF/zk.xml[1]. The preferences are similar to the library properties: they are application-specific name/value pairs. You could use them to configure your application and ZK engine. However, unlike the library properties, preferences are stored in Configuration and can be retrieved by use of Configuration.getPreference(String, String).

For example,

<preference>
    <name>org.zkoss.zk.ui.WebApp.name</name>
    <value>My Killer Application</value>
</preference>




  1. For more information, please refer to The preference Element.



Last Update : 2011/08/08

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