The Concept of Data Binding

From Documentation
Revision as of 04:55, 15 October 2010 by Sphota (talk | contribs) (init)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Concept of Data Binding

ZK's annotated data binding mechanism involves the following players to make it work:

  • Data Bean
  • ZK UI Components declared in ZUL file
  • ZK's annotated data binding manager utility

In a nutshell, a bean's particular property is associated with a specified component attribute, such that whenever a value is modified, the annotated data binding manager calls the data bean's getter and setter methods to keep the values in sync between the bean and the component.
The syntax for declaring this association in ZUML is

<component-name attribute-name="@{bean-name.attribute-name}"/>