5.8 Exploring Hierarchical Data in a Tree
Use the Tree region to show hierarchical data like the management
chain of employees in the EMP table. APEX can manage the hierarchy so you only need to configure the data to display in each tree
node.
- Configuring a Basic Tree Display
After selecting a table likeEMP, configure at least a Node Id column, a Node Label column, and a Parent Key column. The latter value references another node id as its parent to form the hierarchy. - Tracking and Remembering Selection
Tracking and remembering the tree selection requires configuring a hidden page item with its Value Protected property set to false. You'll use this to store the node value of the selected node. If this hidden page item's value is set during page rendering the tree uses it to restore the selected node. - Adding Icons to the Tree
You can use more meaningful node icons to communicate additional information to end users. To control the icon of every node in the tree, provide an additional column whose value indicates the Font APEX icon name to use. - Parent/Child Data in a Tree
You can show parent/child data in a tree by using aUNION ALLquery and cleverly adjusting the foreign key value.
Parent topic: Visualizing and Analyzing Data