-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
programmatically, you can read the bind annotations directly of the components using the getAnnotation/s methods: http://www.zkoss.org/javadoc/7.0.3/zk/org/zkoss/zk/ui/AbstractComponent.html#getAnnotation(java.lang.String,%20java.lang.String) and below
then the binding expression is in the 'value' attribute of that annotation (attention there can be multiple annotations!)
here a short example displaying the expression for the value of the textbox: If you have a reference to the component you can call these methods in your java code of course (this example is chosen for it's brevity):
<div apply="org.zkoss.bind.BindComposer" width="300px">
<textbox value="@load(self.parent.width)" tooltiptext="@load(self.getAnnotation('value', 'load').getAttribute('value'))"/>
</div>
2 | No.2 Revision |
programmatically, you can read the bind annotations directly of the components using the getAnnotation/s methods: http://www.zkoss.org/javadoc/7.0.3/zk/org/zkoss/zk/ui/AbstractComponent.html#getAnnotationhttp://www.zkoss.org/javadoc/7.0.3/zk/org/zkoss/zk/ui/AbstractComponent.html#getAnnotation%28java.lang.String,%20java.lang.String%29(java.lang.String,%20java.lang.String) and below
then the binding expression is in the 'value' attribute of that annotation (attention there can be multiple annotations!)
here a short example displaying the expression for the value of the textbox: If you have a reference to the component you can call these methods in your java code of course (this example is chosen for it's brevity):
<div apply="org.zkoss.bind.BindComposer" width="300px">
<textbox value="@load(self.parent.width)" tooltiptext="@load(self.getAnnotation('value', 'load').getAttribute('value'))"/>
</div>
3 | No.3 Revision |
programmatically, you can read the bind annotations directly of the components using the getAnnotation/s methods: http://www.zkoss.org/javadoc/7.0.3/zk/org/zkoss/zk/ui/AbstractComponent.html#getAnnotation%28java.lang.String,%20java.lang.String%29methods and below:
then the binding expression is in the 'value' attribute of that annotation (attention there can be multiple annotations!)
here a short example displaying the expression for the value of the textbox: If you have a reference to the component you can call these methods in your java code of course (this example is chosen for it's brevity):
<div apply="org.zkoss.bind.BindComposer" width="300px">
<textbox value="@load(self.parent.width)" tooltiptext="@load(self.getAnnotation('value', 'load').getAttribute('value'))"/>
</div>