The language-addon"

From Documentation
m
m
Line 54: Line 54:
 
After creating the component descriptor language-addon we need to create the widget package descriptor.
 
After creating the component descriptor language-addon we need to create the widget package descriptor.
  
For more information, please refer to [[ZK Developer's Reference/Language Definition|ZK Developer's Reference: Language Definition]].
+
For more information, please refer to [[ZK Client-side Reference/Language Definition|ZK Client-side Reference: Language Definition]].
  
 
{{ZKComponentDevelopmentEssentialsPageFooter}}
 
{{ZKComponentDevelopmentEssentialsPageFooter}}

Revision as of 01:57, 3 December 2010


The language-addon contains a description of the relation between the component and widget referred to as the component definition. The path of the file must be /metainfo/zk/lang-addon.xml and be located in the Java class path.

<language-addon>
	<addon-name>simplelabel</addon-name>
	<language-name>xul/html</language-name>
 
	<component>
		<component-name>simplelabel</component-name>
		<component-class>com.foo.SimpleLabel</component-class>
		<widget-class>com.foo.SimpleLabel</widget-class>
		<mold>
			<mold-name>default</mold-name>
			<mold-uri>mold/simple-label.js</mold-uri>
		</mold>
	</component>
</language-addon>

The table below describes the elements used within the above XML and their descriptions.

Name Description
addon-name A unique name for this addon
language-name The language name that this addon belongs to (for instance, xul/html or zhtml)
component-name A unique name of the component in the language of this addon
component-class The name of the component class (Java class)
widget-class The name of the widget class (JavaScript class)
mold A mold definition (optional)
mold-name The name of the mold. The default mold is named default.
mold-uri The URI of the mold

A component may have multiple molds which may or may not have different widget classes. To handle this you may specify the <widget-class> inside <mold>. You can specify more than one mold.

After creating the component descriptor language-addon we need to create the widget package descriptor.

For more information, please refer to ZK Client-side Reference: Language Definition.



Last Update : 2010/12/03

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