Annotate in Java"
From Documentation
(ZK 6) |
m |
||
Line 1: | Line 1: | ||
{{ZKDevelopersReferencePageHeader}} | {{ZKDevelopersReferencePageHeader}} | ||
− | You could annotate a component in Java by the use of | + | You could annotate a component or a property in Java by the use of <javadoc method="addAnnotation(java.lang.String, java.lang.String, java.util.Map)" type="interface">org.zkoss.zk.ui.sys.ComponentCtrl</javadoc>. |
For example, | For example, | ||
<source lang="java" > | <source lang="java" > | ||
Listbox listbox = new Listbox(); | Listbox listbox = new Listbox(); | ||
− | listbox.addAnnotation(null, "foo", null); //annotate listbox | + | listbox.addAnnotation(null, "foo", null); //null in the first argument means to 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:46, 8 February 2012
You could annotate a component or a property in Java by the use of ComponentCtrl.addAnnotation(String, String, Map).
For example,
Listbox listbox = new Listbox();
listbox.addAnnotation(null, "foo", null); //null in the first argument means to annotate listbox
Label label = new Label();
label.addAnnotation("value", "fun", null); //annotate the value property of label
Version History
Version | Date | Content |
---|---|---|