Annotate in Java"

From Documentation
(Created page with '{{ZKDevelopersReferencePageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- |   |   |   |} {{ZKDeveloper…')
 
m (remove empty version history (via JWB))
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{ZKDevelopersReferencePageHeader}}
 
{{ZKDevelopersReferencePageHeader}}
  
=Version History=
+
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>.
{{LastUpdated}}
+
 
{| border='1px' | width="100%"
+
For example,
! Version !! Date !! Content
+
<source lang="java" >
|-
+
Listbox listbox = new Listbox();
| &nbsp;
+
listbox.addAnnotation(null, "foo", null); //null in the first argument means to annotate listbox
| &nbsp;
+
Label label = new Label();
| &nbsp;
+
label.addAnnotation("value", "fun", null); //annotate the value property of label
|}
+
</source>
 +
 
 +
 
  
 
{{ZKDevelopersReferencePageFooter}}
 
{{ZKDevelopersReferencePageFooter}}

Latest revision as of 04:32, 5 February 2024


Annotate in Java


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




Last Update : 2024/02/05

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