Returns the data node indicated by selection. Selection is an index into the list of selected nodes.
FUNCTION GET_TREE_SELECTION
(item_name VARCHAR2,
selection NUMBER);
FUNCTION GET_TREE_SELECTION
(item_id ITEM,
selection NUMBER);
Returns FTREE.NODE
Built-in Type unrestricted function
Enter Query Mode no
item_name |
Specifies the name of the object created at design time. The data type of the name is VARCHAR2 string. |
Item_id |
Specifies the unique ID that Oracle Forms assigns to the item when created. Use the FIND_ITEM Built-in to return the ID to an appropriately typed variable. The data type of the ID is Item. |
selection |
Specifies the selection of a single node. |
/*
** Built-in: GET_TREE_SELECTION
*/
-- This code will process all tree nodes marked as selected. See the
-- Ftree.Set_Tree_Selection Built-in for a definition of "selected".
DECLARE
htree ITEM;
num_selected NUMBER;
current_node FTREE.NODE;
BEGIN
-- Find the tree itself.
htree := Find_Item('tree_block.htree3');
-- Find the number of nodes marked as selected.
num_selected := Ftree.Get_Tree_Property(htree, Ftree.SELECTION_COUNT);
-- Loop through selected nodes and process them. If you are deleting
-- nodes, be sure to loop in reverse!
FOR j IN 1..num_selected LOOP
current_node := Ftree.Get_Tree_Selection(htree, j);
...
END LOOP;
END;