Using a ListModel and RowRenderer"

From Documentation
Line 4: Line 4:
  
 
===Where the View, Model, and Renderer Come Together===
 
===Where the View, Model, and Renderer Come Together===
The association between View, Model, and Renderer takes place in a controller class that extends <javadoc>org.zkoss.zk.ui.util.GenericForwardComposer</javadoc> class. The ZK components declared in mark up are wired with the component instances declared in the controller for our manipulation and events fired are automatically forwarded to this controller for handling.  
+
The association between View, Model, and Renderer takes place in a controller class that extends <javadoc>org.zkoss.zk.ui.util.GenericForwardComposer</javadoc> class. The ZK components declared in mark up are wired with the component instances declared in the controller for our manipulation, while the events fired are automatically forwarded to this controller for handling.
  
 
===Wrapping Data Object with ListModel===
 
===Wrapping Data Object with ListModel===

Revision as of 01:27, 13 October 2010

Stop.png This article is out of date, please refer to http://books.zkoss.org/zkessentials-book/master/ for more up to date information.

Using a ListModel and RowRenderer

Data presentation in ZK involves preparing the Model and Renderer in association with the View (ZK components). Once an association is established between these three parts, the data presented in ZK components are automatically updated whenever the data model is changed. In the previous section, we declared the basic UI skeleton, now we'll look into how to prepare a data model and write a renderer to populate the Grid component.

Where the View, Model, and Renderer Come Together

The association between View, Model, and Renderer takes place in a controller class that extends GenericForwardComposer class. The ZK components declared in mark up are wired with the component instances declared in the controller for our manipulation, while the events fired are automatically forwarded to this controller for handling.

Wrapping Data Object with ListModel