Paging

The pageSize property controls the number of tree items to display at once. By default, it is 10. That is, at most 10 tree items are displayed at the client for each level as depicted in the right figure.

A user can click to see more tree items (i.e., enlarge pageSize), or click or to scroll up and down.

If you want to display all tree items, simply set pageSize to -1. However, it is not recommended if the tree control is huge, since the browser is too slow to handle a tree with huge number of items.

In addition to the pageSize property of a tree control, you can change the page size of each treechildren instance by modifying the pageSize property of the corresponding treechildren instance.

The onPaging and onPageSize Event

When a user clicks or to scroll up and down the page, the onPaging event is sent with an org.zkoss.zul.event.PagingEvent instance. Similarly, the onPageSize event is sent with an org.zkoss.zul.event.PageSize instance when a user clicks .