Class AbstractGroupListitemRenderer<T>
java.lang.Object
org.adempiere.webui.listbox.renderer.AbstractGroupListitemRenderer<T>
- Type Parameters:
T- Common ancestor type for Group and Item class.
- All Implemented Interfaces:
org.zkoss.zul.ListgroupRendererExt,org.zkoss.zul.ListitemRenderer<T>,org.zkoss.zul.ListitemRendererExt
public abstract class AbstractGroupListitemRenderer<T>
extends Object
implements org.zkoss.zul.ListitemRenderer<T>, org.zkoss.zul.ListitemRendererExt, org.zkoss.zul.ListgroupRendererExt
Abstract renderer base class for
Note1: due to a class hierarchy issue, this wouldn't works with
Note2: not working very well with
Listbox with single level grouping.Note1: due to a class hierarchy issue, this wouldn't works with
Listbox.Note2: not working very well with
Listbox.setCheckmark(true). Recommended to roll your own checkbox cell if you need multiple selection.- Author:
- hengsin
-
Field Summary
Fields inherited from interface org.zkoss.zul.ListitemRendererExt
DETACH_ON_RENDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intintabstract StringgetGroupHeaderTitle(T data) org.zkoss.zul.ListcellnewListcell(org.zkoss.zul.Listitem item) org.zkoss.zul.ListgroupnewListgroup(org.zkoss.zul.Listbox listbox) org.zkoss.zul.ListgroupfootnewListgroupfoot(org.zkoss.zul.Listbox listbox) org.zkoss.zul.ListitemnewListitem(org.zkoss.zul.Listbox listbox) voidvoidrenderGroup(org.zkoss.zul.Listitem item, T data, int index) Render groupvoidrenderGroupfoot(org.zkoss.zul.Listitem item, T data, int index) Render group footerabstract voidrenderListitem(org.zkoss.zul.Listitem item, T data, int index) Renders the data to the specified list item.
-
Constructor Details
-
AbstractGroupListitemRenderer
public AbstractGroupListitemRenderer()
-
-
Method Details
-
newListgroup
public org.zkoss.zul.Listgroup newListgroup(org.zkoss.zul.Listbox listbox) - Specified by:
newListgroupin interfaceorg.zkoss.zul.ListgroupRendererExt
-
newListgroupfoot
public org.zkoss.zul.Listgroupfoot newListgroupfoot(org.zkoss.zul.Listbox listbox) - Specified by:
newListgroupfootin interfaceorg.zkoss.zul.ListgroupRendererExt
-
newListitem
public org.zkoss.zul.Listitem newListitem(org.zkoss.zul.Listbox listbox) - Specified by:
newListitemin interfaceorg.zkoss.zul.ListitemRendererExt
-
newListcell
public org.zkoss.zul.Listcell newListcell(org.zkoss.zul.Listitem item) - Specified by:
newListcellin interfaceorg.zkoss.zul.ListitemRendererExt
-
getControls
public int getControls()- Specified by:
getControlsin interfaceorg.zkoss.zul.ListitemRendererExt
-
getColumnCount
public abstract int getColumnCount()- Returns:
- number of columns for listbox
-
getGroupHeaderTitle
- Parameters:
data- group- Returns:
- group header title
-
renderListitem
Renders the data to the specified list item.- Parameters:
item- the listitem to render the result.data- item within a groupindex- the row/list index of the data that is currently being rendered
-
renderGroup
Render group- Parameters:
item-data- groupindex-
-
renderGroupfoot
Render group footer- Parameters:
item-data- footerindex-
-
render
-