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
Renderer for Listbox with single level grouping.
Note that 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
  • Constructor Details

    • AbstractGroupListitemRenderer

      public AbstractGroupListitemRenderer()
  • Method Details

    • newListgroup

      public org.zkoss.zul.Listgroup newListgroup(org.zkoss.zul.Listbox listbox)
      Specified by:
      newListgroup in interface org.zkoss.zul.ListgroupRendererExt
    • newListgroupfoot

      public org.zkoss.zul.Listgroupfoot newListgroupfoot(org.zkoss.zul.Listbox listbox)
      Specified by:
      newListgroupfoot in interface org.zkoss.zul.ListgroupRendererExt
    • newListitem

      public org.zkoss.zul.Listitem newListitem(org.zkoss.zul.Listbox listbox)
      Specified by:
      newListitem in interface org.zkoss.zul.ListitemRendererExt
    • newListcell

      public org.zkoss.zul.Listcell newListcell(org.zkoss.zul.Listitem item)
      Specified by:
      newListcell in interface org.zkoss.zul.ListitemRendererExt
    • getControls

      public int getControls()
      Specified by:
      getControls in interface org.zkoss.zul.ListitemRendererExt
    • getColumnCount

      public abstract int getColumnCount()
      Returns:
      number of columns for listbox
    • getGroupHeaderTitle

      public abstract String getGroupHeaderTitle(T data)
      Parameters:
      data - group
      Returns:
      group header title
    • renderListitem

      public abstract void renderListitem(org.zkoss.zul.Listitem item, T data, int index)
      Renders the data to the specified list item.
      Parameters:
      item - the listitem to render the result.
      data - item within a group
      index - the row/list index of the data that is currently being rendered
    • renderGroup

      public void renderGroup(org.zkoss.zul.Listitem item, T data, int index)
      Render group
      Parameters:
      item -
      data - group
      index -
    • renderGroupfoot

      public void renderGroupfoot(org.zkoss.zul.Listitem item, T data, int index)
      Render group footer
      Parameters:
      item -
      data - footer
      index -
    • render

      public void render(org.zkoss.zul.Listitem item, T data, int index) throws Exception
      Specified by:
      render in interface org.zkoss.zul.ListitemRenderer<T>
      Throws:
      Exception