The richlet Element"

From Documentation
m
m (correct highlight (via JWB))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{ZKConfigurationReferencePageHeader}}
 
{{ZKConfigurationReferencePageHeader}}
  
To declare a richlet, you have to add the <tt>richlet</tt> element to <tt>zk.xml</tt>. You could specify any number of <tt>richlet</tt> elements. Each of them must have two child elements, <tt>richlet-name</tt> and <tt>richlet-class</tt>, and might have any number of the <tt>init-param</tt> child elements.
+
To declare a richlet, you have to add the <code>richlet</code> element to <code>zk.xml</code>. You could specify any number of <code>richlet</code> elements. Each of them must have two child elements, <code>richlet-name</code> and <code>richlet-class</code>, and might have any number of the <code>init-param</code> child elements.
  
The class name specified in the <tt>richlet-class</tt> element must implement the <javadoc type="interface">org.zkoss.zk.ui.Richlet</javadoc> interface. The name and value specified in the <tt>init-param</tt> element can be retrieved when the <tt>init</tt> method of <javadoc method="init(org.zkoss.zk.ui.RichletConfig)" type="interface">org.zkoss.zk.ui.Richlet</javadoc> is called.
+
The class name specified in the <code>richlet-class</code> element must implement the <javadoc type="interface">org.zkoss.zk.ui.Richlet</javadoc> interface. The name and value specified in the <code>init-param</code> element can be retrieved when the <code>init</code> method of <javadoc method="init(org.zkoss.zk.ui.RichletConfig)" type="interface">org.zkoss.zk.ui.Richlet</javadoc> is called.
  
  
Line 17: Line 17:
 
</source>
 
</source>
  
Once declaring a richlet, you can map it to any number of URL by use of [[ZK Configuration Reference/zk.xml/The richlet-mapping Element|the richlet-mapping element]] as described in the next section.
+
Once declaring a richlet, you can map it to any number of URL by the use of [[ZK Configuration Reference/zk.xml/The richlet-mapping Element|the richlet-mapping element]] as described in the next section.
  
 
=Version History=
 
=Version History=

Latest revision as of 10:33, 19 January 2022


The richlet Element


To declare a richlet, you have to add the richlet element to zk.xml. You could specify any number of richlet elements. Each of them must have two child elements, richlet-name and richlet-class, and might have any number of the init-param child elements.

The class name specified in the richlet-class element must implement the Richlet interface. The name and value specified in the init-param element can be retrieved when the init method of Richlet.init(RichletConfig) is called.


<richlet>
	<richlet-name>Test</richlet-name>
	<richlet-class>org.zkoss.zkdemo.TestRichlet</richlet-class>
	<init-param>
		<param-name>any</param-name>
		<param-value>any</param-value>
	</init-param>
</richlet>

Once declaring a richlet, you can map it to any number of URL by the use of the richlet-mapping element as described in the next section.

Version History

Last Update : 2022/01/19


Version Date Content
     



Last Update : 2022/01/19

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