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}} | ||
− | = | + | 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, | |
− | + | <source lang="java" > | |
− | + | 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 | |
− | + | </source> | |
+ | |||
+ | |||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Latest revision as of 04:32, 5 February 2024
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