Gostaria se possivel de mais uma ajuda.
Estou fazendo um exemplo bem simples aqui para popular um TREE.
Queria ajuda de vocês para ver o que esta errado.
O codigo é esse :
DECLARE
htree ITEM;
top_node FTREE.NODE;
new_node FTREE.NODE;
item_value VARCHAR2(30);
xtopico tab_dicas.topico%type;
xassunto tab_dicas.assunto%type;
num number;
xrg RECORDGROUP;
XQUERY VARCHAR2(50);
cursor T_topico is
select topico
from tab_dicas
group by topico;
cursor T_assunto is
select assunto
from tab_dicas
where topico = xtopico
group by assunto ;
BEGIN
-- Find the tree itself.
htree := Find_Item('BL_TREE.T_DICA');
-- Copy the item value to a local variable.
item_value := xtopico;
-- Add an expanded top level node to the tree
-- with no icon.
for i in T_topico loop
--ftree.pOPULATE_TREE (htree);
new_node := Ftree.Add_Tree_Node(htree,
Ftree.ROOT_NODE,
Ftree.PARENT_OFFSET,
Ftree.LAST_CHILD,
Ftree.EXPANDED_NODE,
I.TOPICO,
NULL,
i.topico);
xtopico := i.topico;
xrg := find_group ('rg_a');
--XQUERY := 'select assunto from tab_dicas where topico = ''' || :?: xtopico || ''' AND ROWNUM =1';
--top_node := find_tree_node (i.topico);
Ftree.Add_Tree_Data(htree,
new_node,
Ftree.parent_offset,
Ftree.last_child,
ftree.QUERY_TEXT,
'SELECT 1 FROM DUAL');
end loop;
--num:= show_alert ('alert_message');
end;