What's Renderer"

From Documentation
m (Created page with '{{ZKDevelopersGuidePageHeader}} A renderer is responsible for rendering the layout of certain model. For example, <tt>RowRenderer</tt> is responsible for rendering data stored i…')
 
m (correct highlight (via JWB))
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
  
 
A renderer is responsible for rendering the layout of certain model.
 
A renderer is responsible for rendering the layout of certain model.
For example, <tt>RowRenderer</tt> is responsible for rendering data stored in the <tt>ListModel</tt> to the specified <tt>row</tt> in the <tt>Grid</tt>.
+
For example, <code>RowRenderer</code> is responsible for rendering data stored in the <code>ListModel</code> to the specified <code>row</code> in the <code>Grid</code>.
  
 
ZK has provided default renders:
 
ZK has provided default renders:
 
==Three Steps to Use Live Data==
 
*Prepare the data in the form of <tt>ListModel</tt>. ZK has a concrete implementation called <javadoc>org.zkoss.zul.SimpleListModel</javadoc>  for representing an array of objects.
 
*Implement the <javadoc type="interface">org.zkoss.zul.RowRenderer</javadoc> interface for rendering a row of data into the Grid.
 
** This is optional. If it is not specified, the default <tt>rowrender</tt> is used to render the data into the first column.
 
** You could implement different renderers for represent the same data in different views.
 
*Specify the data in the <tt>model</tt> property, and, optionally, the <tt>rowrender</tt> in the <tt>rowRenderer</tt> property.
 
  
 
{{ ZKDevelopersGuidePageFooter}}
 
{{ ZKDevelopersGuidePageFooter}}

Latest revision as of 10:40, 19 January 2022

Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


A renderer is responsible for rendering the layout of certain model. For example, RowRenderer is responsible for rendering data stored in the ListModel to the specified row in the Grid.

ZK has provided default renders:



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.