Home » Developer & Programmer » Forms » Hierchy Treee (D2k)
Hierchy Treee [message #283299] Mon, 26 November 2007 10:57 Go to next message
ORAGENASHOK
Messages: 238
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 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
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;
Re: Hierchy Treee [message #284040 is a reply to message #283884] Wed, 28 November 2007 11:05 Go to previous messageGo to next message
ORAGENASHOK
Messages: 238
Registered: June 2006
Location: Chennai
Senior Member
Can any one take care of my query i need your help urgently
Re: Hierchy Treee [message #288834 is a reply to message #284040] Tue, 18 December 2007 21:41 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

Have a look at:
A form with table definition.
http://www.orafaq.com/forum/t/77009/0/unread/67467/#msg_229389
Another form.
http://www.orafaq.com/forum/m/215628/67467/?srch=tree#msg_215628
And another
http://www.orafaq.com/forum/t/83541/67467/
And
http://www.orafaq.com/forum/t/83923/67467/
and from 2005
http://www.orafaq.com/forum/t/32866/67467/
Populate Nth level of Hierarchical tree
http://www.orafaq.com/forum/t/87093/67467/
Icons
http://www.orafaq.com/forum/m/215770/67467/?srch=TRIGGER_NODE#msg_215770
Change the icon on a node.
http://www.orafaq.com/forum/t/90909/67467/

David
Previous Topic: NVL with ORDER BY
Next Topic: dynamically item text property
Goto Forum:
  


Current Time: Sat Dec 03 05:44:01 CST 2016

Total time taken to generate the page: 0.10691 seconds