About Hierarchical Trees
The hierarchical tree displays data in the form of a standard navigator.
We can populate a hierarchical tree with values contained in a Record Group or Query Text.
At runtime, you can programmatically add, remove, modify, or evaluate elements in a hierarchical tree.
The amount of data displayed at any one time depends upon the expansion of individual data nodes.
Triggers
Following Triggers are Provided by Form Builder exclusively for hierarchical tree Items.
1. When-Tree-Node-Activated
2. When-Tree-Node-Expanded
3. When-Tree-Node-Selected
Built-ins
Following built-in subprograms are used to add, remove, modify, or evaluate elements in a hierarchical tree Items.
All built-ins are located in the FTREE built-in package.
1. Add_Tree_Data
2. Add_Tree_Node
3. Delete_Tree_Node
4. Find_Tree_Node
5. Get_Tree_Node_Parent
6. Get_Tree_Selection
7. Populate_Group_From_Tree
8. Populate_Tree
9. Set_Tree_Selection
Now, we will see, how to Develop a form Using Hierarchical Tree Item for Oracle Application.
Objectives :
1. Create the Hierarchical Tree Item in a Non-Database Block.
2. Populate the Data to the Hierarchical Tree Item Using Record Group at Runtime.
3. Create a Database Block to Display the Data(s) based on the Element Navigating on the Hierarchical Tree Item.
Database Objects Required to Develop this Form :
Find the Attachment contains the Script to Create Database Objects & Sample Data’s to be Inserted.
In the Canvas Tool Palette we can I find the Hierarchical Tree.
Note : Hierarchical Tree Item Should be in a separate Block as a Individual Item.
There are 2 ways to populate a hierarchical tree :
1. Record Group
2. Query Text
The record Group query should be in the specified structure., which requires 5 Columns.
SELECT STATUS, LEVEL, LABEL, ICON, VALUE FROM TABLE;
STATUS à Indicates the initiate status of the Node (Normally Value is 1).
LEVEL à This is a specific pseudo-column Derived from “CONNECT BY”.
LABEL à This is the visible label of the Node.
ICON à That contains the icon name of the Node (can be NULL).
VALUE à That contains the value of the Node.
Below is the Query used in the Record Group to Populate the Data in the Hierarchical Tree Item.
SELECT 1, LEVEL, ENAME, NULL, TO_CHAR(EMPNO) APPS.EMP CONNECT BY PRIOR EMP.EMPNO = EMP.MGR;
Object Navigator :
Canvas Design :
At Run Time :
Kindly have a look on the Below Triggers :
1. WHEN-NEW-FORM-INSTANCE (Form Level)
2. WHEN-TREE-NODE-SELECTED (Item Level)
I hope this will be Useful for custom Developments.
Recent Comments