Revision history [back]

click to hide/show revision 1
initial version

answered 2015-03-31 03:11:15 +0800

cor3000 gravatar image cor3000

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>

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>

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>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More