The “hierarchy-parent” tag can be used to present a hierarchical view of information.
Note that hierarchy is only available in the second generation data sheet view.
First, create the HR sample web application using Oracle Database Engine.
Adding a New Page
When generation is complete, activate the Project Designer. On the Project Explorer toolbar, click on the New Page icon.
![Creating a new page. Creating a new page.](/blog/2013/02/configuring-hierarchy/image02.png)
Assign a name to the page:
Property | Value |
Name | Hierarchy |
Press OK to save. Drop the new Hierarchy page node on the right side of Home page to place it second in the menu.
![Hierarchy page is second in the menu. Hierarchy page is second in the menu.](/blog/2013/02/configuring-hierarchy/image06.png)
Switch to the Controllers tab. Right-click on EMPLOYEES data controller and press Copy.
![Copying EMPLOYEES controller. Copying EMPLOYEES controller.](/blog/2013/02/configuring-hierarchy/image08.png)
Switch back to the Pages tab. Right-click on Hierarchy page and press Paste. The data controller will be instantiated as a data view.
![The data view has been instantiated as a data view in a container on the page. The data view has been instantiated as a data view in a container on the page.](/blog/2013/02/configuring-hierarchy/image12.png)
Configuring Hierarchy in Data Sheet
Double-click on Hierarchy / c101 / view1 (EMPLOYEES) / grid1 view node.
![View 'grid1' of EMPLOYEES controller. View 'grid1' of EMPLOYEES controller.](/blog/2013/02/configuring-hierarchy/image14.png)
Change the view type.
Property | New Value |
Type | Data Sheet |
Press OK to save. Double-click on Hierarchy / c101 / view1 (EMPLOYEES) / grid1 / MANAGER_ID –> MANAGER_LAST_NAME data field node.
![Data field 'MANAGER_ID' of view 'grid1'. Data field 'MANAGER_ID' of view 'grid1'.](/blog/2013/02/configuring-hierarchy/image16.png)
Tag the data field as the hierarchy parent.
Property | New Value |
Tags | hierarchy-parent |
Press OK to save.
Viewing the Results
On the toolbar, press Browse. The data sheet will now be organized according to the hierarchy.
![Hierarchy in the Oracle sample database. Hierarchy in the Oracle sample database.](/blog/2013/02/configuring-hierarchy/image18.png)