Samples"

From Documentation
m
Line 1: Line 1:
{{ZKDevelopersReferencePageHeader}}
+
{{ZKClient-sideReferencePageHeader}}
  
 
=Sample of a Language Definition=
 
=Sample of a Language Definition=
Line 88: Line 88:
 
|}
 
|}
  
{{ZKDevelopersReferencePageFooter}}
+
{{ZKClient-sideReferencePageFooter}}

Revision as of 02:56, 3 December 2010


Sample of a Language Definition

Here is a sample (from ZUL's lang.xml):

<language>
	<language-name>xul/html</language-name>
	<device-type>ajax</device-type>
	<namespace>http://www.zkoss.org/2005/zul</namespace>
	<extension>zul</extension><!-- the first extension is the major one -->
	<extension>xul</extension>

	<version>
		<version-class>org.zkoss.zul.Version</version-class>
		<version-uid>5.0.6</version-uid>
	</version>

	<javascript package="zk"/>
	<javascript package="zul.lang"/>
	<stylesheet href="~./zul/css/zk.wcs" type="text/css"/>

	<renderer-class>org.zkoss.zul.impl.PageRenderer</renderer-class>

	<label-template>
		<component-name>label</component-name>
		<component-attribute>value</component-attribute>
	</label-template>
	<macro-template>
		<macro-class>org.zkoss.zk.ui.HtmlMacroComponent</macro-class>
	</macro-template>
	<native-template>
		<native-class>org.zkoss.zk.ui.HtmlNativeComponent</native-class>
	</native-template>

	<component>
		<component-name>a</component-name>
		<component-class>org.zkoss.zul.A</component-class>
		<widget-class>zul.wgt.A</widget-class>
		<text-as>label</text-as><!-- treat text within the element as the label property -->
		<mold>
			<mold-name>default</mold-name>
			<mold-uri>mold/a.js</mold-uri>
			<css-uri>css/a.css.dsp</css-uri>
		</mold>
	</component>
</language>

Sample of a Language Addon

Here is a sample (from zkmax's lang-addon.xml):

<language-addon>
	<addon-name>zkmax</addon-name>
	<depends>zkex</depends>
	<language-name>xul/html</language-name>

	<version>
		<version-class>org.zkoss.zkmax.Version</version-class>
		<version-uid>5.0.5</version-uid>
		<zk-version>5.0.5</zk-version><!-- or later -->
	</version>

	<javascript package="zkmax" merge="true"/>

	<component>
		<component-name>portallayout</component-name>
		<component-class>org.zkoss.zkmax.zul.Portallayout</component-class>
		<widget-class>zkmax.layout.Portallayout</widget-class>
		<mold>
			<mold-name>default</mold-name>
			<mold-uri>mold/portallayout.js</mold-uri>
			<css-uri>css/portallayout.css.dsp</css-uri>
		</mold>
	</component>
</language-addon>

Version History

Last Update : 2010/12/03


Version Date Content
     



Last Update : 2010/12/03

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