Renderer"

From Documentation
m
 
Line 4: Line 4:
  
 
#. Render child components: like <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>, <javadoc type="interface">org.zkoss.zul.RowRenderer</javadoc>
 
#. Render child components: like <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>, <javadoc type="interface">org.zkoss.zul.RowRenderer</javadoc>
#. Render HTML snippets: <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>.
+
#. Render HTML snippets: <javadoc type="interface">org.zkoss.zul.ItemRenderer</javadoc>.
  
 
The implementation of a renderer depends on the component. For example, the display of <javadoc>org.zkoss.zul.Listbox</javadoc> can be customized by an implementation of <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>, and <javadoc>org.zkoss.zul.Grid</javadoc> by <javadoc type="interface">org.zkoss.zul.RowRenderer</javadoc>.
 
The implementation of a renderer depends on the component. For example, the display of <javadoc>org.zkoss.zul.Listbox</javadoc> can be customized by an implementation of <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>, and <javadoc>org.zkoss.zul.Grid</javadoc> by <javadoc type="interface">org.zkoss.zul.RowRenderer</javadoc>.

Latest revision as of 02:59, 30 January 2024

A renderer is a Java class that produces child items based on a data model. It renders your data into View. There are 2 kinds of renderers:

  1. . Render child components: like ListitemRenderer, RowRenderer
  2. . Render HTML snippets: ItemRenderer.

The implementation of a renderer depends on the component. For example, the display of Listbox can be customized by an implementation of ListitemRenderer, and Grid by RowRenderer.

If you prefer to define the rendering of each item in the ZUML document, you can use templates instead.




Last Update : 2024/01/30

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