version"

From Documentation
m (correct highlight (via JWB))
 
(2 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
It specifies the version of this language definition or addon. It also controls whether to ignore this document.
 
It specifies the version of this language definition or addon. It also controls whether to ignore this document.
  
First, ZK checks if the specified class (<version-calss>) matches the version (<version-uid>). Second, it checks if ZK's version is the same or larger than the version specified in <zk-version>.
+
First, ZK checks if the specified class (<version-class>) matches the version (<version-uid>). Second, it checks if ZK's version is the same or larger than the version specified in <zk-version>.
  
The specified class, if any, must have a static field called <tt>UID</tt>. ZK will compare its value with the version specified in &lt;version-uid&gt;. For example,
+
The specified class, if any, must have a static field called <code>UID</code>. ZK will compare its value with the version specified in &lt;version-uid&gt;. For example,
  
 
<source lang="java">
 
<source lang="java">
 
package foo;
 
package foo;
 
public class MyAddon {
 
public class MyAddon {
     public static public static final String UID = "1.0.3";
+
     public static final String UID = "1.0.3";
 
}
 
}
 
</source>
 
</source>
Line 33: Line 33:
 
</source>
 
</source>
  
which means <tt>foo.MyAddon.UID</tt> must be 1.0.3, and <javadoc method="getVersion()" type="interface">org.zkoss.zk.ui.WebApp</javadoc> must be 5.0.0 or later.
+
which means <code>foo.MyAddon.UID</code> must be 1.0.3, and <javadoc method="getVersion()" type="interface">org.zkoss.zk.ui.WebApp</javadoc> must be 5.0.0 or later.
  
 
=Version History=
 
=Version History=

Latest revision as of 07:44, 18 January 2022


Syntax:

<version>
   <version-class>a_class</version-class>
   <version-uid>a_version</version-uid>
   <zk-version>a_version</zk-version>
</version>
[Optional]

It specifies the version of this language definition or addon. It also controls whether to ignore this document.

First, ZK checks if the specified class (<version-class>) matches the version (<version-uid>). Second, it checks if ZK's version is the same or larger than the version specified in <zk-version>.

The specified class, if any, must have a static field called UID. ZK will compare its value with the version specified in <version-uid>. For example,

package foo;
public class MyAddon {
    public static final String UID = "1.0.3";
}

Then, you could specify it as follows.

<version>
	<version-class>foo.MyAddon</version-class>
	<version-uid>1.0.3</version-uid>
	<zk-version>5.0.0</zk-version>
</version>

which means foo.MyAddon.UID must be 1.0.3, and WebApp.getVersion() must be 5.0.0 or later.

Version History

Last Update : 2022/01/18


Version Date Content
     



Last Update : 2022/01/18

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