The Concept of Data Binding"

From Documentation
(init)
 
m
Line 9: Line 9:
 
<component-name attribute-name="@{bean-name.attribute-name}"/>
 
<component-name attribute-name="@{bean-name.attribute-name}"/>
 
</source>
 
</source>
 +
 +
===A Basic Example of ZK Annotated Data Binding===

Revision as of 07:28, 21 October 2010

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}"/>

A Basic Example of ZK Annotated Data Binding