This exercise demonstrates the use of the TreeControl . This control element generates a tree whose nodes can be exploded and closed. For this, the programmer merely provides the display data (of the data model) by the implementation of a simple interface.
The TreeControl offers the following features:
- The lines at the uppermost level can be displayed or hidden. Different images can be stored in an ImageMap for the nodes and the leaves. The assignment of the images to the relevant tree nodes takes place with the help of regular expressions.
- The control element independently administers all the necessary status data across several Server Roundtrips. This includes, for example, the exploded or closed status of a tree node.
- Check boxes can be displayed or hidden before the tree entries. When selecting a node at a lower level, all the higher-level nodes are selected automatically.
Only the following steps are required for using the TreeControl:
- Selection of the design for the user interface.
- Creation of an action class.
- Instancing of a TreeControl.
- Provision of display data.
- Configuration of the tree within the JSP-Page.
to step 1