Hierchy Treee [message #283299] |
Mon, 26 November 2007 10:57 |
ORAGENASHOK
Messages: 240 Registered: June 2006 Location: Chennai
|
Senior Member |
|
|
Hi,
To implement the hierarchical tree functionality.
I have created new block for the tree and then placed the tree tool from the toolbar into the new canvas and record group will be created.
To populate the record group into the tree i will written the code in WHEN-NEW-FORM-INSTANCE trigger as given below
DECLARE
htree ITEM;
BEGIN
htree := Find_Item('tree_block.tree1');
Ftree.Set_Tree_Property(htree,Ftree.RECORD_GROUP,'RECORD_GROUP5');
END;
But when at the execution time it will show the error like below
FRM-47321: Data used to populate tree is invalid
what is the sequence of trigger to create the tree.
|
|
|
Re: Hierchy Treee [message #283884 is a reply to message #283299] |
Wed, 28 November 2007 06:14 |
ORAGENASHOK
Messages: 240 Registered: June 2006 Location: Chennai
|
Senior Member |
|
|
Hi
When i am trying to implement the H-TREE in my form the query is my record_group query and i created in the navigator record group link
"SELECT -1 NODE_STATE,
LEVEL NODE_DEPTH,
ename NODE_LABEL,
NULL NODE_ICON,
empno NODE_VALUE
FROM scott.emp
CONNECT BY PRIOR empno=mgr
START WITH mgr IS NULL"
The below query is coded in WHEN-NEW-FORM-INSTANCE and also i tried with a WHEN-BUTTON-PRESSED trigger but both will not work. It will not show me any error it will remain and i am not get any data in my tree item
DECLARE
htree ITEM;
BEGIN
-- Find the tree itself.
htree := Find_Item('tree_block.htree3');
-- Sets the record group and causes the data to display.
Ftree.Set_Tree_Property(htree,Ftree.RECORD_GROUP,'record_group5');
END;
-- Tree Node Expansion Example
-- This code will expand all nodes in a tree.
DECLARE
htree ITEM;
BEGIN
-- Find the tree itself.
htree := Find_Item('tree_block.htree3');
-- Find the root node of the tree.
node := Ftree.Find_Tree_Node(htree, '');
-- Loop through all nodes and expand each one if it is collapsed.
WHILE NOT Ftree.ID_NULL(node) LOOP
state := Ftree.Get_Tree_Node_Property(htree,
node,
Ftree.NODE_STATE);
IF state = Ftree.COLLAPSED_NODE THEN
Ftree.Set_Tree_Node_Property(htree,
node,
Ftree.NODE_STATE,
Ftree.EXPANDED_NODE);
END IF;
node := Ftree.Find_Tree_Node(htree, '', search_root => node);
END LOOP;
END;
|
|
|
|
|