Event:
See Specification.
Besides creating {@link Listitem} programmingly, you could assign a datamodel (a {@link ListModel} or {@link GroupsModel} instance) to a listbox via{@link #setModel(ListModel)} or {@link #setModel(GroupsModel)} and then thelistbox will retrieve data via {@link ListModel#getElementAt} when necessary.
Besides assign a list model, you could assign a renderer (a {@link ListitemRenderer} instance) to a listbox, such that the listbox willuse this renderer to render the data returned by {@link ListModel#getElementAt}. If not assigned, the default renderer, which assumes a label per list item, is used. In other words, the default renderer adds a label to a row by calling toString against the object returned by {@link ListModel#getElementAt}
There are two ways to handle long content: scrolling and paging. If {@link #getMold} is "default", scrolling is used if {@link #setHeight} iscalled and too much content to display. If {@link #getMold} is "paging",paging is used if two or more pages are required. To control the number of items to display in a page, use {@link #setPageSize}.
If paging is used, the page controller is either created automatically or assigned explicity by {@link #setPaginal}. The paging controller specified explicitly by {@link #setPaginal} is called the external page controller. Itis useful if you want to put the paging controller at different location (other than as a child component), or you want to use the same controller to control multiple listboxes.
Default {@link #getZclass}: z-listbox.(since 3.5.0)
To have a list box without stripping, you can specify a non-existent style class to {@link #setOddRowSclass}. @author tomyeh @see ListModel @see ListitemRenderer @see org.zkoss.zul.ListitemRendererExt @since 3.5.2
|
|