Annotate in Java"

From Documentation
(ZK 6)
Line 6: Line 6:
 
<source lang="java" >
 
<source lang="java" >
 
Listbox listbox = new Listbox();
 
Listbox listbox = new Listbox();
listbox.addAnnotation("foo", null); //annotate listbox
+
listbox.addAnnotation(null, "foo", null); //annotate listbox
 
Label label = new Label();
 
Label label = new Label();
 
label.addAnnotation("value", "fun", null); //annotate the value property of label
 
label.addAnnotation("value", "fun", null); //annotate the value property of label

Revision as of 09:45, 8 February 2012


Annotate in Java


You could annotate a component in Java by the use of ComponentCtrl.addAnnotation(String, Map), and annotate a property by ComponentCtrl.addAnnotation(String, String, Map).

For example,

Listbox listbox = new Listbox();
listbox.addAnnotation(null, "foo", null); //annotate listbox
Label label = new Label();
label.addAnnotation("value", "fun", null); //annotate the value property of label

Version History

Last Update : 2012/02/08


Version Date Content
     



Last Update : 2012/02/08

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