A script-enabled browser is required for this page to function properly.

SET_TREE_PROPERTY Built-in

Description

Sets the value of the indicated hierarchical tree property.

Syntax

PROCEDURE SET_TREE_PROPERTY
(item_name VARCHAR2,
property NUMBER,
value NUMBER);

PROCEDURE SET_TREE_PROPERTY
(item_name VARCHAR2,
property NUMBER,
value VARCHAR2);

PROCEDURE SET_TREE_PROPERTY
(item_name VARCHAR2,
property NUMBER,
value RECORDGROUP);

PROCEDURE SET_TREE_PROPERTY
(item_id ITEM,
property NUMBER,
value NUMBER);

PROCEDURE SET_TREE_PROPERTY
(item_id ITEM,
property NUMBER,
value VARCHAR2);

PROCEDURE SET_TREE_PROPERTY
(item_id ITEM,
property NUMBER,
value RECORDGROUP);

Built-in Type unrestricted procedure

Enter Query Mode no

Parameters

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.
property

Specify one of the following properties:

RECORD_GROUP Replaces the data set of the hierarchical tree with a record group and causes it to display.

QUERY_TEXT Replaces the data set of the hierarchical tree with an SQL query and causes it to display.

ALLOW_EMPTY_BRANCHES Possible values are PROPERTY_TRUE and PROPERTY_FALSE.

value

Specify the value appropriate to the property you are setting:

PROPERTY_TRUE The property is to be set to the TRUE state.

PROPERTY_FALSE The property is to be set to the FALSE state.

SET_TREE_PROPERTY Examples

This code could be used in a WHEN-NEW-FORM-INSTANCE trigger to initially populate the hierarchical tree with data.

/*

** Built-in: SET_TREE_PROPERTY
*/

DECLARE
htree ITEM;
v_ignore NUMBER; 
rg_emps RECORDGROUP; 

BEGIN

-- Find the tree itself. 
htree := FIND_ITEM('tree_block.htree3');   
-- Check for the existence of the record group. 
rg_emps := FIND_GROUP('emps'); 
IF NOT ID_NULL(rg_emps)
THEN  DELETE_GROUP(rg_emps); 
END IF;   
-- Create the record group. 
rg_emps := CREATE_GROUP_FROM_QUERY('rg_emps', 
'select 1, level, ename, NULL, to_char(empno) '
||  'from emp '
||  'connect by prior empno = mgr '
||  'start with job = ''PRESIDENT''');   
-- Populate the record group with data. 
v_ignore := POPULATE_GROUP(rg_emps);   
-- Transfer the data from the record group to the hierarchical 
-- tree and cause it to display. 
FTREE.SET_TREE_PROPERTY(htree, FTREE.RECORD_GROUP, rg_emps); 
END;