Each tree item has the open property used to control whether to display its child items. The default value is true. By setting this property to false, you could control what part of the tree is invisible.
<treeitem open="false">
When a user clicks on the +/- button, he opens the tree item and makes its children visible. The onOpen event is then sent to the server to notify the application.
For sophisticated applications, you can defer the creation of the content of the tree item or manipulate its content dynamically, until the onOpen event is received. Refer to the Load on Demand section in th ZK User Interface Markup Language chapter for details.