:SYSTEM.TRIGGER_NODE is only valid in one of the WHEN-TREE-NODE-xxx-triggers.
If you want to get the value from the selected node in any other place, you have to the Ftree.GET_TREE_SELECTION built-in
1) You right !!! I use WHEN-BUTTON-PRESS trigger, and in this trigger I need to write this peace of code to get the current node ( tell me, if this true or there is a short way to achieve the same solution):
-- number of selection by thr user. usually (in our case), equal to 1.
l_num_selected := FTREE.GET_TREE_PROPERTY(HTree, FTREE.SELECTION_COUNT);
-- return the node number, according the order the node appearance
FOR j IN 1..l_num_selected
current_node := FTREE.GET_TREE_SELECTION(HTree, j);
2) another question : Does a tree must have only one root or is possible more then one root?
A tree can have as many "visible" rootnodes as you like. All nodes you add to the master Ftree.ROOT_NODE will be visible root-nodes.
Thank- you for your answer. I ask about the database - Do I have to create a single root in the DataBase or is possible more than one root?
1 person found this helpful
You can have more than one root also when using a select as basedata for your tree.
I have anther question about hierarchal tree:
In the Data Query - I use a parameter in the where clause of the select.
If I use a number (as hard coded) the query work just fine. But when I write a parameter - the tree doesn't appear at all...
As I wrote, the where clause locate in the sub-query inside the union clause.
Someone can please answer to my question above (parameter in data-query)?
Thanks in advanced,