Listbox Renderer"
From Documentation
Line 3: | Line 3: | ||
Here we describe how to implement a custom renderer for a listbox (<javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>). For the concepts about component, model and renderer, please refer to [[ZK_Developer's_Reference/MVC/Model/List_Model#Model-driven_Display|the Model-driven Display section]]. | Here we describe how to implement a custom renderer for a listbox (<javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc>). For the concepts about component, model and renderer, please refer to [[ZK_Developer's_Reference/MVC/Model/List_Model#Model-driven_Display|the Model-driven Display section]]. | ||
− | When a listbox (<javadoc>org.zkoss.zul.Listbox</javadoc>) is assigned with a model, a default renderer is assigned too. The default renderer will assume the listbox is a single column, and it converted the element into a string. If you want to display multiple columns or retrieve a particular field of the element, you have to implement <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc> to handle the rendering. | + | When a listbox (<javadoc>org.zkoss.zul.Listbox</javadoc>) is assigned with a model, a default renderer is assigned too. The default renderer will assume that the listbox is a single column, and it converted the element into a string. If you want to display multiple columns or retrieve a particular field of the element, you have to implement <javadoc type="interface">org.zkoss.zul.ListitemRenderer</javadoc> to handle the rendering. |
=Version History= | =Version History= |
Revision as of 10:19, 22 July 2011
Here we describe how to implement a custom renderer for a listbox (ListitemRenderer). For the concepts about component, model and renderer, please refer to the Model-driven Display section.
When a listbox (Listbox) is assigned with a model, a default renderer is assigned too. The default renderer will assume that the listbox is a single column, and it converted the element into a string. If you want to display multiple columns or retrieve a particular field of the element, you have to implement ListitemRenderer to handle the rendering.
Version History
Version | Date | Content |
---|---|---|