Samples"

From Documentation
Line 2: Line 2:
  
 
__TOC__
 
__TOC__
 +
 +
=Sample of a Language Addon=
 +
Here is a sample (from zkmax's lang-addon.xml):
 +
 +
<source lang="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>
 +
</source>
 +
 +
  
 
=Sample of a Language Definition=
 
=Sample of a Language Definition=
Here is a sample (from ZUL's lang.xml):
+
Here is a sample (from zul.jar/lang.xml):
  
 
<source lang="xml">
 
<source lang="xml">
Line 40: Line 72:
 
<component-class>org.zkoss.zul.A</component-class>
 
<component-class>org.zkoss.zul.A</component-class>
 
<widget-class>zul.wgt.A</widget-class>
 
<widget-class>zul.wgt.A</widget-class>
<text-as>label</text-as><!-- treat text within the element as the label property -->
+
<text-as>label</text-as>
 
<mold>
 
<mold>
 
<mold-name>default</mold-name>
 
<mold-name>default</mold-name>
Line 50: Line 82:
 
</source>
 
</source>
  
=Sample of a Language Addon=
 
Here is a sample (from zkmax's lang-addon.xml):
 
 
<source lang="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>
 
</source>
 
  
 
=Version History=
 
=Version History=

Revision as of 01:29, 16 November 2022


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>


Sample of a Language Definition

Here is a sample (from zul.jar/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>
		<mold>
			<mold-name>default</mold-name>
			<mold-uri>mold/a.js</mold-uri>
			<css-uri>css/a.css.dsp</css-uri>
		</mold>
	</component>
</language>


Version History

Last Update : 2022/11/16


Version Date Content
     



Last Update : 2022/11/16

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