首页 > 数据库技术 > 详细

Create Hierarchical Tree To Control Records In Oracle Forms

时间:2016-12-25 01:34:27      阅读:343      评论:0      收藏:0      [点我收藏+]

 

技术分享

 

Providing an example form for creating hierarchical trees in Oracle Forms to control data block records. In this form whenever user selects any node in tree menu then corresponding record is displayed at right side.

 

This form is having two data blocks, EMP and Control, the control block is having Tree Item and populating that tree on PRE-FORM trigger with the following code:

 

ftree.populate_tree(‘CONTROL.EMP_TREE‘);

ftree.set_tree_property(‘CONTROL.EMP_TREE‘, FTREE.QUERY_TEXT,

   ‘SELECT decode(level, 1, 1, -1), level, INITCAP(ename), ‘‘fxrun‘‘,‘ ||

    ‘empno FROM   SCOTT_emp ‘ ||

    ‘START WITH mgr IS NULL CONNECT BY PRIOR empno = mgr‘);

 

And whenever user select any node then the following code is written on When-Tree-Node-Selected trigger to fetch the record for the selected employee:

 

go_block(‘EMP‘);

set_block_property(‘EMP‘, DEFAULT_WHERE, ‘EMPNO=‘||

   ftree.get_tree_node_property(‘CONTROL.EMP_TREE‘, :SYSTEM.TRIGGER_NODE,

      FTREE.NODE_VALUE));

execute_query;

 

The fxrun.ico icon and table scott_emp is used in this example and script of this table and icon file are available in source code.

Like us to get notifications for free source code in future, thanks.

Create Hierarchical Tree To Control Records In Oracle Forms

原文:http://www.cnblogs.com/quanweiru/p/6218770.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!