The Library Properties"
From Documentation
Line 4: | Line 4: | ||
= System Scope = | = System Scope = | ||
+ | If you define a library property as a system property within the configuration file of your web server, though the system property affects the whole system, not just one web application. | ||
+ | |||
+ | = Application Scope = | ||
To define a library property, you can configure it in <code>WEB-INF/zk.xml</code><ref>For more information, please refer to [[ZK Configuration Reference/zk.xml/The library-property Element | the library-property element]]. | To define a library property, you can configure it in <code>WEB-INF/zk.xml</code><ref>For more information, please refer to [[ZK Configuration Reference/zk.xml/The library-property Element | the library-property element]]. | ||
</ref>. For example, | </ref>. For example, | ||
+ | '''Single value''' | ||
<source lang="xml"> | <source lang="xml"> | ||
<library-property> | <library-property> | ||
Line 13: | Line 17: | ||
</library-property> | </library-property> | ||
</source> | </source> | ||
− | + | ||
+ | '''Multiple values''' | ||
<source lang="xml"> | <source lang="xml"> | ||
<library-property> | <library-property> | ||
Line 28: | Line 33: | ||
</source> | </source> | ||
− | + | ||
Revision as of 03:36, 9 January 2020
Here is a list of supported library properties that ZK recognizes.
System Scope
If you define a library property as a system property within the configuration file of your web server, though the system property affects the whole system, not just one web application.
Application Scope
To define a library property, you can configure it in WEB-INF/zk.xml
[1]. For example,
Single value
<library-property>
<name>org.zkoss.zul.Button.mold</name>
<value>trendy</value>
</library-property>
Multiple values
<library-property>
<name>org.zkoss.bind.proxy.IgnoredProxyClasses</name>
<appendable>true</appendable>
<list>
<value>java.util.Date</value>
<value>java.sql.Date</value>
<value>java.sql.Timestamp</value>
<value>java.math.BigDecimal</value>
<value>java.math.BigInteger</value>
</list>
</library-property>
Custom Attributes
You also can configure some properties with <custom-attributes> in a zul. Notice that not all properties support this, please check each property's page.
Page scope
Put it out of any component
<custom-attributes org.zkoss.zul.listbox.rod="false"/>
<listbox id="box1">
</listbox>
<listbox id="box2">
</listbox>
Component Scope
Put it under a specific component:
<listbox>
<custom-attributes org.zkoss.zul.listbox.rod="false"/>
...
</listbox>
- ↑ For more information, please refer to the library-property element.