Annotation

From Documentation
Revision as of 11:24, 9 February 2012 by Tomyeh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Name: annotation
Namespace: http://www.zkoss.org/2005/zk/annotation
Namespace shortcut: client
Java: LanguageDefinition.ANNOTATION_NAMESPACE

It is the reserved namespace for specifying the annotation. By default, the annotation is recognized by its syntax, @name(arguments), so you generally don't have to specify the annotation namespace. For example, the following two statement are equivalent:

<textbox value="@bind(vm.p1.firstName)"/> <!-- implies the annotation name space -->
<textbox a:value="@bind(vm.p1.firstName)" xmlns:a="annotation"/> <!-- equivalent to the above -->

If you have to specify both the value and annotation of a property, the annotation namespace is useful. For example,

<textbox value="abc" a:value="@annot()" xmlns:a="annotation"/>

On the other hand, if a value looks like an annotation and you don't want it to be interpreted as an annotation, you could specify the component's namespace, such as zul. For example,

<textbox z:value="@thisIsValueNotAnnot()" xmlns:z="zul"/>

For the syntax of annotations, please refer to ZK Developer's Reference: Annotations.

Version History

Last Update : 2012/02/09


Version Date Content
     



Last Update : 2012/02/09

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