Hierarchical Tree control
Dear all,
Any body send me hints or sample codes about using Hierarchical tree control in forms
Type that into google and you should get some stuff. The biggest thing to remember is the query MUST have (presuming you are populating a tree from a db) certain values.
Check out this dicussion which I started when I was learning: Re: Creating a menu system (not a file menu)
Similar Messages
-
Forms on web Hierarchical Tree control does not expand lines
running forms 6i on windows client-server mode HTree control works OK,
but with developer server on Unix
HTree sometimes does not expand lines properly (usually at the bottom of htree control) and after such situation form is stacked
Icon usage does not make a difference.
If I will expand the whole tree at startup it seems to be working fine, but I want to show it collapsed.
Please help.It doesn't sound like this is the answer in your case, but here is a problem I had with tree icons in 6i which took me a while to figure out.
For some unknown and probably pointless reason, forms converts the tree query to uppercase before executing it. This can cause problems if the sql contains any hardcoded strings. In my case I was doing something like
decode(status,1,'red',2,'green')||icon_name
this resulted in REDicon when my icon was actually redicon.gif -
Hierarchical tree not showing up while running the form
Hi Gurus,
I have a problem while running forms in 10g AS.
The hierarchical tree control is showing up when I run the form in my local development (win xp) system. But, when I run the same form through my 10g Application server(linux), the hierarchical tree control is not showing up.
Can anyone suggest some solutions ?
Thanks in advance.
Sundar KHi Andreas,
Thanks for the reply.
The form shows a blank square-box, instead hiearchical tree. I can see other controls like text-box, LOV, command button on the same form.
The java console shows,
Downloading http://test.abits.com:7778/forms/java/frmall_jinit.jar to JAR cache
Downloading http://test.abits.com:7778/forms/java/f60tree.jar to JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet version is : 10.1.2.0
The problem persist, even though I change the appsweb.cfg file to use frmall.jar instead of frmall_jinit.jar.
I'm using 10g application server (iAS 10.1.2.0.2).
Kindly advise. Thanks in advance.
Sundar K -
AS 3.0 & WebService & Tree control Bind to hierarchical data?
What is the trick to get the results of a call to a
webservice that returns a hierarchical XML SOAP document to map
directly to a Tree Control's dataProvider property?
In the debugger, I can see that lastResult is an ObjectProxy
which has a couple of properties and one of them is an
ArrayCollection as I expect. However, I can't figure out how to use
this result with a Tree control and the dataProvider property so
that I can navigate thru the hierarchy returned.
TIA
GeorgeYeah this is using the embedded scripting. I need to change this to show the final sql vs. the script that is being used.
-kris -
How to set the control-on hierarchical tree nodes
Hi,
I have created form in which at the left it has hierarchical tree structure(BOM) and towards the right it brings up the query results for selected node.
Now, I have a button upon clicking which I navigate to the root node by issuing
"Ftree.set_Tree_selection(htree, 1, Ftree.select_on);".
But, it cannot automatically run the ' when-tree-node-selected' trigger '.
any solution???
Its really urgent.I have a customer demo on monday.
Please help me asap.
regards,
Nagadeep.Hello Nagadeep,
couldn't you just put the code from the trigger into a procedure
and run that after the navigation to the item?
Just a thought,
Bernd
The docs state that:
No programmatic action will cause the When-Tree-Node-Selected trigger to fire. Only end-user action will generate an event.
Probably due to performance reasons.
Bernd
Message was edited by:
Bernd Prechtl -
Tree-control for data input?
Hi,
I need to program an input screen for values that have hierarchical dependencies (e.g. sums). I feel, the most adequate user-interface would be a tree control, because of the data dependencies and also because the users asked for a possibility to collapse/expand parts of the data during input.
I had a look at CL_GUI_COLUMN_TREE, but I'm not sure, if it can be used for data input. Has anyone done something like this before or can anybody direct me to some additional sample coding? (the sample coding in the reuse library didn't do it...)
Thanks for your help, greetings, Kathrin!Hello Kathrin,
Since you say that the user's input is hierarchical in nature, it is nice to have a tree-control for input. But, the choice of using a custom-control-version of the tree is a cause for some concern. I cannot recollect any of the SAP screens where the input can be given through such a tree framework (please do let me know if you have come across one). The problem with such a tree would be in the areas of even-handling. Filling the tree with appropriate data at the right times would be another challenge.
However, there's one alternative that I would like to direct your attention to. You must have observed another kind of tree, when you select an application component from the APPLICATION HIERARCHY, which is just like a list. Also, the <i>Transport Organizer (SE09)</i>, <i>Menu Painter (SE41)</i> etc., have this kind of a tree. You can use this if you (or rather your users) are very particular on having a tree display. For more information, you can see the Function Group <b>SEUT</b>, which has the required function modules to accomplish the same. The Function Group is well documented, and you might have to work a little on the function modules themselves.
Please do let me know if this is a suitable option to meet your requirement. All the best,
Regards,
Anand Mandalika. -
Add checkbox on the nodes of Hierarchical tree in oracle forms 9i
Hi,
I am working on oracle forms 9i.I have to add checkbox at the place of node(+/-) in Hierarchical tree so,
that user can select or deselect the Tree.That can do in oracle forms but how i don't know.
can anybody help me.....
Regards,
HemantYou can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
Craig... -
Make an hierarchical Tree in oracle Forms 6i
Hi everybody,
I want to make an hierarchical tree. I work in Forms 6i
I create one non database block e.g. 'Bloc2' then
add hierarchical control item in that. e.g 'Menu'.
I create a record group named 'RG_DATA_TEST'
Before I use a table in this record_group.
I want a tree as this :
- Menu1
Menu1 option1
Menu1 option2
- Menu1 option3
Menu option3 Sub opt 3
+ Menu2
the table 'Menu_tree' is described' :
CREATE TABLE MENU_tree
ID NUMBER(5),
LABEL VARCHAR2(128 BYTE),
ICON VARCHAR2(40 BYTE),
MASTER NUMBER(5),
STATUS NUMBER(1) DEFAULT 1,
VALUE VARCHAR2(128 BYTE)
Here the data in the table :
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (1, 'Menu1', 'mainmenu', NULL, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (
2, 'Menu1 Option 1', 'optionmenu', 1, 1, 'Dialog11');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 3, 'Menu1 Option 2', 'optionmenu', 1, 1, dialog12');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (4, 'Menu1 Option 3', 'optionmenu', 1, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 5, 'Menu1 Opt 3 Sub Opt 3', 'suboptionmenu', 4, 1, 'Dialog131');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 6, 'Menu2', 'mainmenu', NULL, -1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 7, 'Menu2 Option1', 'optionmenu', 6, 1,'Dialog21');
The record_group use this instruction SELECT :
SELECT STATUS, LEVEL, LABEL, ICON, VALUE
FROM MENU_tree
CONNECT BY PRIOR ID = MASTER
START WITH MASTER IS NULL
And At the trigger When_new_form_instance , i do this code :
DECLARE
htree ITEM;
V_IGNORE number;
BEGIN
HTREE := FIND_ITEM('BLOC2.MENU');
V_IGNORE := POPULATE_GROUP('RG_DATA_TEST');
FTREE.POPULATE_TREE(htree);
END;
When i run the forms, It don't give me a structure of node.
It give me only a icon with two arrows.
Where is the problem ?
Must I add code somewhere ?
Help me for your ideas.
Regards.
Edited by: 794982 on 17 sept. 2010 04:55
Edited by: 794982 on 17 sept. 2010 05:01
Edited by: 794982 on 17 sept. 2010 05:04
Edited by: 794982 on 17 sept. 2010 05:06
Edited by: 794982 on 17 sept. 2010 05:13
Edited by: 794982 on 17 sept. 2010 05:19
Edited by: 794982 on 17 sept. 2010 05:23Ok Francois Thanks for your response.
Just I pricise i work with oracle forms version 9.0.4.0.19 .
But I am putting this code in trigger When_New_form_Instance but it didn't work.
When I execute it just shows a line with two arrows but not a real tree.
Then I do a block-non based and a elemnt with type hierarticall tree and a canevas.
and i create a record_group. and in a palette property of the element i precise the canevas and the record_group
I don't khnow where is the problem ?
Any other suggestion ? please
Regards. -
Hi,
I have a hierarchal tree table that I want to represent using forms (insert and update data in the tree table).
Are there any LINKS or documentation that can help me with my little project :-)
Thanks,
Marc.The help file has a fairly detailed description of how to manipulate the tree control.
Provided you have a table that can do this I would do "connect by prior" and "start with" SQL statement and use the pseudo column called "level" to determine when to create a new sub tree and when to end it. -
Hierarchical Tree's scrollbars
Hi all,
I've created a canvas with a hierarchical tree item. It displays correctly in web envinronment, whilst, when run at runtime, it shows always the scrollbars (both vertical and horizontal) also when the hierarchical structure fits perfectly the item's size.
Do I missed something or I have to download some pacth for my Forms?
My envinronment is: WIN2000, Forms 6i 6.0.8.13.0 - Production, Oracle RDBMS 8.1.7.1.0 - Production
Thanks in advance,
MarcoNothing you can do about this, the scrollbars ar a "feature" of the control that we use on Windows. You can't switch them off.
As you note, on the web, the scrollbars come and go as required, -
Hierarchical Tree not showing using a record group to populate
Hi, I am trying to set up an hierarchical tree. Can someone please give me the exact steps I need to take to get this right.
I am trying to create a hierarchical tree to behave like a menu on a Main form from where I will call the other forms of my application.
I have done the following
select 1, level, null, form_name, form_name
from iso_forms
connect by prior form_name=action
start with action is null
and get this when I run the statement in pl/sql
1 LEVEL NULL FORM_NAME FORM_NAME
1 1 Edit Edit
1 2 Holder Holder
1 2 Isotopes Isotopes
1 2 Laboratories Laboratories
1 2 Personal Personal
1 2 Incident Incident
1 2 Equipment Equipment
1 2 Over Exposure Over Exposure
1 2 Archive Archive
1 1 Print Print
1 1 Queries Queries
My tree on my main form is still blank, I have checked that the tree is the only item in the block but I am not sure how to confirm that it is a control block. I created the tree in layout editor by clicking on the Hierarchical Tree icon on the left and then dragging out a block, so I am assuming that the block is of the correct type.
Thank you for your assistance
Michaela control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
I suggest you create a procedure where you create the record_group using
CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
Here is my code that I i used to populate my tree .it works:
PROCEDURE populate_the_tree IS
grp recordgroup;
error_number number;
grpname varchar2(20) :='rg_group';
tree_id item :=find_item('ctrl.tree');
grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
begin
grp := find_group(grpname);
if not id_null(grp)
then delete_group(grp);
end if;
-- grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
grp := create_group_from_query(grpname,grp_qry2);
error_number:=populate_group(grpname);
if error_number <> 0
then message('Error while populating tree');
raise form_trigger_failure;
end if;
ftree.set_tree_property(tree_id,ftree.record_group,grp);
END;
Message was edited by:
lewismak2000 -
Hierarchical tree traversal..!!
Hi all,
I've populated a tree (Hierarchical tree - Ftree in Forms6i). Now I want to traverse it from the root node to the last nodes' last leaf....
How can i achieve this...
Please guide me through...
Very urgent
Thanx in advance...
RK Rajua control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
I suggest you create a procedure where you create the record_group using
CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
Here is my code that I i used to populate my tree .it works:
PROCEDURE populate_the_tree IS
grp recordgroup;
error_number number;
grpname varchar2(20) :='rg_group';
tree_id item :=find_item('ctrl.tree');
grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
begin
grp := find_group(grpname);
if not id_null(grp)
then delete_group(grp);
end if;
-- grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
grp := create_group_from_query(grpname,grp_qry2);
error_number:=populate_group(grpname);
if error_number <> 0
then message('Error while populating tree');
raise form_trigger_failure;
end if;
ftree.set_tree_property(tree_id,ftree.record_group,grp);
END;
Message was edited by:
lewismak2000 -
Hi, My hierarchical tree is not showing on the form, I have the following situation;
I have a table with the parent and child coloumns, I have created a Record_Group using a query that I have tested in PL/SQL it works
select 1, level, form_name
from iso_forms
connect by prior form_name=action
start with action is null
The rsult is
1 LEVEL FORM_NAME
1 1 Edit
1 2 Holder
1 2 Isotopes
1 2 Laboratories
1 2 Personal
1 2 Incident
1 2 Equipment
1 2 Over Exposure
1 2 Archive
1 1 Print
1 1 Queries
11 rows selected.
I have set in the properties of the tree to use the Record_Group that has this query, but when I run the form I only see a blank square where the tree should be showing.
Can anyone tell me what I am doing wrong?
Thank you
Michaela control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
I suggest you create a procedure where you create the record_group using
CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
Here is my code that I i used to populate my tree .it works:
PROCEDURE populate_the_tree IS
grp recordgroup;
error_number number;
grpname varchar2(20) :='rg_group';
tree_id item :=find_item('ctrl.tree');
grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
begin
grp := find_group(grpname);
if not id_null(grp)
then delete_group(grp);
end if;
-- grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
grp := create_group_from_query(grpname,grp_qry2);
error_number:=populate_group(grpname);
if error_number <> 0
then message('Error while populating tree');
raise form_trigger_failure;
end if;
ftree.set_tree_property(tree_id,ftree.record_group,grp);
END;
Message was edited by:
lewismak2000 -
I would like to Know concept of Hierarchical Tree of forms 6i. What query should be written in the record group to populate the tree and how to implement hierarchical tree to make the form act like Windows Explorer .
Thank You.Read the documentation. Here is a sample query to load the record group.
PROCEDURE prc_populate_record_group
IS
CURSOR g IS
SELECT groupnum,
groupnm
FROM merch_group
ORDER BY groupnm;
CURSOR c (l_groupnum NUMBER) IS
SELECT categorynum,
categorynm
FROM merch_group_category
WHERE groupnum = l_groupnum
ORDER BY categorynm;
i NUMBER;
l_rg_id RECORDGROUP;
l_init_state GROUPCOLUMN;
l_level GROUPCOLUMN;
l_label GROUPCOLUMN;
l_icon GROUPCOLUMN;
l_value GROUPCOLUMN;
l_node ftree.node;
l_next_node ftree.node;
l_tree_item ITEM;
BEGIN
l_rg_id := FIND_GROUP('PRC_GROUP_CAT');
IF NOT ID_NULL(l_rg_id)
THEN
DELETE_GROUP(l_rg_id);
END IF;
l_rg_id := CREATE_GROUP('PRC_GROUP_CAT');
l_init_state := ADD_GROUP_COLUMN(l_rg_id, 'init_state', NUMBER_COLUMN);
l_level := ADD_GROUP_COLUMN(l_rg_id, 'level', NUMBER_COLUMN);
l_label := ADD_GROUP_COLUMN(l_rg_id, 'label', CHAR_COLUMN, 40);
l_icon := ADD_GROUP_COLUMN(l_rg_id, 'icon', CHAR_COLUMN, 20);
l_value := ADD_GROUP_COLUMN(l_rg_id, 'value', CHAR_COLUMN, 40);
i := 1;
FOR g_rec IN g
LOOP
ADD_GROUP_ROW (l_rg_id, i);
SET_GROUP_NUMBER_CELL(l_init_state, i, -1);
SET_GROUP_NUMBER_CELL(l_level, i, 1);
SET_GROUP_CHAR_CELL(l_label, i, g_rec.groupnm| |' - '| |g_rec.groupnum);
SET_GROUP_CHAR_CELL(l_icon, i, NULL);
SET_GROUP_CHAR_CELL(l_value, i, g_rec.groupnum);
i := i + 1;
FOR c_rec IN c (g_rec.groupnum)
LOOP
ADD_GROUP_ROW (l_rg_id, i);
SET_GROUP_NUMBER_CELL(l_init_state, i, -1);
SET_GROUP_NUMBER_CELL(l_level, i, 3);
SET_GROUP_CHAR_CELL(l_label, i, c_rec.categorynm| |' - '| |c_rec.categorynum);
SET_GROUP_CHAR_CELL(l_icon, i, NULL);
SET_GROUP_CHAR_CELL(l_value, i, c_rec.categorynum);
i := i + 1;
END LOOP;
END LOOP;
--Find the tree
l_tree_item := find_item('CONTROL.TREE4');
-- Assign record group to item causing the data to display
ftree.set_tree_property(l_tree_item, ftree.record_group, l_rg_id);
-- Find the root node of the tree
l_node := ftree.find_tree_node(l_tree_item, '');
END;
null -
Creating a Hierarchical Tree in Forma 6i
Hi Gurus,
We are using forms 6i and oracle 9i. In oracle forms i have one control block and another control block. When we click on one column repname ,the other control block displays the
corresponding info for the sales rep name. eg. Lets say i pick John the salesrep in the other
control block it displays its code,geography region etc.
I want to create a hierarchical tree in the other block where it is displaying the salesrep info.
So i want when i click on the sales rep name(the other control block measure)
then it should the code,geography region etc in the form of hierarchical tree in the other control
block. If the sales rep name is not clicked then the control block having the salesrep info should be hidden.
I would appreciate your help.
Thanks,
PSOplace your treeitem in the layout. The treeitem has to the only item in the block and property "Single record" has to be true.
To populate your tree with data you can either
- use a query to populate a treeitem have a look at this thread Tree Menu
- use the Ftree.Add_Tree_Node built-in and program your own logic.
Maybe you are looking for
-
Problem with install Mavericks
I have installed update flash-storage, but when i wanna to instal mavericks, he request me again to install update flash-storage for macbook air. And so on ad infinitum I don't know what can i do Will not install until i put the firmware flash-stor
-
I had this problem before. The video clips in a menu will not play in the simulator or on the created DVD. To fix the problem a certain file (maybe a preference file) had to be thrown away. I can not remember what file that is. Does anyone know its n
-
Sound Blaster 5.1 is there drivers from Vista
Hi today i purchased Creative Sound Blaster 5.(not li've) and I?want to know if there is drivers for Vista x64?
-
Hi All, When I execute a transaction in SAP, the system shows several information and warning messages (some on the menu bar at the bottom and some through pop-up windows) before finally executing the transaction. On the other hand, when I execute th
-
hii.. i m using OAS10g,want to enable tracing through form level...ie trace a particular user. i made the user to use the following link to load his application so that i can creat a trace file in my $ORACLE_HOME/forms/trace... ie http://ip adddress: