Package org.zkoss.zul
Interface ItemRenderer<T>
-
- All Known Implementing Classes:
BindCascaderRenderer
,BindChosenboxRenderer
,BindSearchboxRenderer
,BindSelectboxRenderer
public interface ItemRenderer<T>
Used to generated the HTML fragment for the data associated with a component, such asSelectbox
.- Since:
- 6.0.0
- Author:
- jumperchen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
render(Component owner, T data, int index)
Renders the data to the corresponding HTML fragment, and returns the HTML fragment.
-
-
-
Method Detail
-
render
java.lang.String render(Component owner, T data, int index) throws java.lang.Exception
Renders the data to the corresponding HTML fragment, and returns the HTML fragment.- Parameters:
owner
- the component that this renderer belongs to (never null).data
- that is returned fromListModel.getElementAt(int)
index
- the data index that is currently being rendered- Returns:
- the HTML fragment representing the data. It depends on the component this renderer belongs to.
- Throws:
java.lang.Exception
-
-