Package org.zkoss.zul
Interface ListitemRenderer<T>
-
public interface ListitemRenderer<T>Identifies components that can be used as "rubber stamps" to paint the cells in aListbox.If you need better control, your renderer can also implement
ListitemRendererExt. If you need better control for genertingListgroupandListgroupfoot, your renderer can also implementListgroupRendererExt.In addition, you could also implement
RendererCtrl. For example, starts an transaction, and uses it to render all items for the same request.- Author:
- tomyeh
- See Also:
ListModel,Listbox,ListitemRendererExt,ListgroupRendererExt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrender(Listitem item, T data, int index)Renders the data to the specified list item.
-
-
-
Method Detail
-
render
void render(Listitem item, T data, int index) throws java.lang.Exception
Renders the data to the specified list item.- Parameters:
item- the listitem to render the result. Note: when this method is called, the listitem has no child at all, unless you don't returnListitemRendererExt.DETACH_ON_RENDERwhenListitemRendererExt.getControls()is called.You can invoke
Listitem.setLabel(java.lang.String)to createListcellimplicitly, or create one or multipleListcellexplicitly.data- that is returned fromListModel.getElementAt(int)index- the index of the data that is currently being rendered- Throws:
java.lang.Exception
-
-