Trees in Apex 4.0
HelloIs it possible to make ajax tree in Apex 4.0 to 'remember' its state between the loading of the page?
Now, he always returned to his State of origin after reloading the page, for example, a case is closed.
Tiina
Tiina salvation,
If you want to save the State of your tree, to expand the tree until the last selected node, you can use the attribute "Element of Page selected node" of your tree. Change your tree and tree attributes page, define the 'node selected Page Item' to a page element or application that you want to store the value of the selected node for example P21_SELECTED_NODE, such as used in the demonstration of the tree. Then update the link parameter in your query tree to this element the value of the VALUE of your query parameter. e.g EMPNO. Now, when you select a node and return to the page of the tree, the tree will be extended to the last selected node.
You may find it useful to refer to a thread related to this topic: Re: question of tree
Kind regards
Hilary
Tags: Database
Similar Questions
-
Best way to display a report of the hierarchy tree to APEX 4.2
I have a hierarchical query spans four levels over two tables. The application works very well and also includes columns hierarchical sum (i.e. the parent displays the sum of all children) using functions.
I wonder what is the best way to view these data for users?
At the moment I think I would have a collection now my connection with the edition special 'show' column. Then I would include HTML to define values correct show/hide and refresh the report when you click on a node. In my view, this would probably work, but may not be the best way.
I disassembled my request for necessary columns (no column of the sum) and the tree APEX regions work well for this. Y at - it a plugin alternative jquery or anything that people with what will give me the directory structure 4.2 native while allowing me to display additional columns with links?
If I need to provide more info let me know!
LSDev wrote:
I'm going to use today to test these ideas, and if they don't work I'll go with the classic report hack, I thought.
AEC: I'll try the plugin and report back on the question if I can get the links to work.
The plugin code is clear and simple. However, the links generated HTML text in the query as:
... '' || apex_escape.html(ename) || '' employee ...
does not work out of the box as the plug-in is escaping in HTML output column values:
-- Render all other columns FOR j IN 3 .. l_value_list.count LOOP sys.htp.p('
' || sys.htf.escape_sc(l_value_list(j)(i)) || ' '); END LOOP;This can be changed to allow the links:
-- Render all other columns FOR j IN 3 .. l_value_list.count LOOP IF l_value_list(j)(i) not like '' || l_value_list(j)(i) || ''); END LOOP;
-
Hello guys,.
What JavaScript is good develop only a single node?
I have this code to develop the entire tree:
tree_id = $('div.tree').attr ('id');
apex.widget.Tree.expand_all (tree_id);
But I only want one node, how do I do this?
I have a button called: P22_SELECTED_NODE who receive the id of tree node.
Thank you
Raul WelterRaul,
In my view, that the open_node function will do what you want. Current documentation (note that there is a newer version than what jsTree is in the APEX, but this should always be specific):
.open_node (node, reminder, skip_animation)
Opens a node closed, so that its children are visible. If configuration animation option is greater than 0, the children are revealed using a slide the bottom of the animation, whose duration is the value of the animation in milliseconds config option. Raises an event.
Hope that helps,
-David -
Hello
I am currently working on trees at the Apex 4 using this query
Select case when connect_by_isleaf = 1 then 0
When level = 1 then 1
of another-1
end the status,
level,
"NAME" in the title,
NULL as an icon,
'ID' as the value,
NULL as ToolTip,
? p = & APP_ID.:200220022 :'|| : APP_SESSION |': P200220020_R_K :'|| ' ' ID ' as link
of ' #OWNER # '. " V_200_20_FTN_TREE ".
Start with 'LINK' is null
connect in advance 'ID' = 'PID '.
brothers and sisters of order by 'ID '.
The tree displays on the screen, but the challenge is that duplicate records. Please its urgentCouple of point
a. the ID before link should be in single quotes? Although it is not the issue right now
b. which is the column with the Id of the Parent of this tree? NEST. Therefore, PID which should go to start with the appropriate expression is null, or =. What condition must return only one line!Kind regards
-
Default appearance of a tree of APEX
Currently a tree on my apex request page loads fully developed mode. That is, all nodes and nodes are displayed.
I have a need to load the page for all the collpased to its parent (not root level however) when the page is loaded.
How can I get that without significant programming?
Thank you
RThe simplest thing would be to set a property of tree Levels Max to a value that is not expand all levels.
-
My own tree in APEX 4.2 icons
Hello.
I can't find any documentation on the correct syntax for the column "icon" of the SQL statement to create the tree. I don't know if it should be a URL, a class, no matter what...
I've seen examples of the latest versions, but none works.
If I write a string in the column of the icon, say 'custom_icon '.
Select case when connect_by_isleaf = 1 then 0
When level = 1 then 1
else -1
end the status,
level,
'CHI' as the title,
"custom_icon" as an icon.
'CHI' as a value.
NULL as ToolTip,
NULL as link
Of...
then I see on the generated HTML code
< script type = "text/javascript" >
var l39146525463344744Data =]
{attributes: {'id': 'CERN'}, data: {"title": "CERN", "icon": "custom_icon", attributes: {}}, children: [...]}
What should I do to show my own icon? I have icons in the workspace and associated with the application itself as well... I don't mind using a class for icons on my page...
Thanks in advance
Pedro
Hi Pedro,
I had one on my Example of Application, showing the use of the custom icons in a tree, where the name of the image must be prefixed according to its location. For example, a standard image will be referenced as "#IMAGE_PREFIX #name.gif", an image of workspace as "#WORKSPACE_IMAGES #name.gif" and an image of the application as #APP_IMAGES #name.gif. Our documentation is missing on this front, so we will ensure that it is updated to a future version. I hope this helps.
Kind regards
Hilary
-
APEX 4.0 how to build a tree?
I am building a tree as an aid to navigation. There is no selection 'tree' in APEX under the shared components > Navigation.
I found an article at http://www.apex-blog.com/oracle-apex/turning-a-tree-into-a-navigation-aid-17.html
However, it does not concern APEX 4.0. This is for older versions of the APEX.
So, I can't find any documentation about the construction of a navigation APEX 4.0 tree
Can someone tell me how or where to find on the internet?
I have created a simple "APEX_PAGES" table with my columns (ID, PAGE_NO, PARENT_PAGE_NO, NAME, NAVIGATION).
Now what should I do?
Thank you
MaggieI am building a tree as an aid to navigation. There is no selection 'tree' in APEX under the shared components > Navigation.
>
So, I can't find any documentation about the construction of a navigation APEX 4.0 treeCan someone tell me how or where to find on the internet?
>Chapter 8, Oracle® Application Express version of the Application Builder 4.0 User Guide ?
The change to this item of jsTree was not quite universally hailed. A number of people have experienced difficulties with the passage of the earlier implementation, or their expectations offered by the new features. Suggest that you search on the forum for more information. Don't comment on myself because I have made no use of the 'new' tree and only minimal use of the previous.
-
ExtJS tree Plugin does not work with extjs 3.4.0
Dear,
I have used apex 4.2 and extjs 3.4.0 and I use Extjs tree Plugin, before I used extjs 3.4.0 tree plugin works well, after I used extjs 3.4.0 tree is not displayed
I used this file called extjs
and I use it as a plugin in Ext JS Source directory<link rel="stylesheet" type="text/css" href="/i/ext/3.4.0/resources/css/ext-all.css"> <link rel="stylesheet" type="text/css" href="/i/ext/3.4.0/ex3-1-local-viewport.css"> <script type="text/javascript" src="/i/ext/3.4.0/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="/i/ext/3.4.0/ext-all.js"></script> <script type="text/javascript" src="http://timographya.com/extjs-3.3.1/ext-all-debug-w-comments.js"></script> <script type="text/javascript"src="/i/ext/3.4.0/ex3-1-local-viewport.js"></script>
default value: #IMAGE_PREFIX#ext/3.4.0/
so why the tree does not now?
Thank youHi Ahmed
You include Ext JS twice and two different versions.
Delete this line
In the future please create test on apex.oracle.com cases when you have questions, because it will be impossible to resolve otherwise. Also, do not forget that the use of Ext JS requires a valid license and so does the plugin to tree for APEX.
See you soon
Matt -
default tree in oracle apex4.1
Hello
I have a table named "DMS_DOCUMENT_MAS".
Annual is the primary key.
I specified in this document of the table with their folder name.
This table as folder name, name of the sub folder and document name. Subfolder can be null.
How I can create the tree by default in apex4.1.
Thank you * cordially
CORINEDear Bernard,
Take on my detailed here measures
Re: Question about trees at APEXIf you answer this question, please mark the thread as closed and give points where won...
Best regards
Mahmoud -
I am trying to create my first tree with Apex 4.1.
The user must click on a store name, which will be extended to show the employees in this shop
My two tables are
and the code of my tree isCREATE TABLE GUS_SHOP_DETAILS ( SHOP_ID NUMBER, SHOP_NAME VARCHAR2(30), ADDRESS VARCHAR2(30), ZIP NUMBER, CITY_ID NUMBER ) CREATE TABLE GUS_EMPLOYEE ( EMP_ID NUMBER, LNAME VARCHAR2(30), FNAME VARCHAR2(30), SHOP_ID NUMBER, ZIP NUMBER )
When I run the SQL workshop I get an ORA-01722: invalid number error.select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status, level, name as title, null as icon, id as value, null as tooltip, null as link from ( SELECT SHOP_ID || ':' AS id, null as parent, SHOP_NAME as name, NULL, NULL, NULL FROM GUS_SHOP_DETAILS UNION ALL SELECT SHOP_ID||':'||EMP_ID as id, SHOP_ID as parent, LNAME as name, NULL, NULL, NULL FROM GUS_EMPLOYEE ) start with parent is null connect by prior id = parent order siblings by name
Can someone point me in the right direction
See you soon
GusHello
I guess your CITY_ID column is a NUMBER.
from ( SELECT CITY_ID as id, /* Id is datatype Number (1) */ null as parent, ... FROM GUS_CITY_LOOKUP UNION ALL SELECT CITY_ID||':'||SHOP_ID as id, /* Here is Id is Varchar2 */ CITY_ID as parent, /* Number (2)*/ SHOP_NAME as name, .. UNION ALL SELECT CITY_ID||':'||SHOP_ID||':'||EMP_ID as id, CITY_ID||':'||SHOP_ID as parent, /*Varchar2 */ LNAME as name,
Change the CITY_ID in (1) and (2) of TO_CHAR (CITY_ID) and try.
Kind regards
-
Trees does not not in 4.0 for several tables
I built the query:
Select case when connect_by_isleaf = 1 then 0
When level = 1 then 1
of another-1
end the status,
level,
name as title,
NULL as an icon,
ID as the value,
NULL as ToolTip
de)
To_char (nihub_qa_group_id) SELECT ID,
NULL as parent,
GroupName as name,
NULL link,
NULL a1,
NULL A2
OF nihub_qa_groups
UNION ALL
SELECT to_char (nihub_qa_group_id): ': ' | TO_CHAR (nihub_qa_tables_id) as id,
TO_CHAR (nihub_qa_group_id) as a parent,
table_NAME as name,
NULL link,
NULL a1,
NULL A2
OF nihub_qa_table_tree_v
)
Start with the parent is set to null
connect by prior id = parent
siblings arrested by name
but the tree will not display. I get the error: Warning: tree root ID '10000' could not be found. and when I debug I get errors: ORA-06550: line 34, column 34: PL/SQL: ORA-00904: "ID": invalid identifier ORA-06550: line 3, column 13: PL/SQL: SQL statement ignored ORA-06550: line 37, column 64: PLS 00364: 'I' use the loop index variable is invalid ORA-06550: line 37, column 15: PL/SQL: statement ignored.
My paintings is quite simple:
nihub_qa_group:
CREATE TABLE nihub_qa_groups
(
nihub_qa_group_id NUMBER NOT NULL,
GroupName VARCHAR2 (255) NOT NULL CHECK (single)
)
;
ALTER TABLE nihub_qa_groups
Add a CONSTRAINT "Group PK" PRIMARY KEY (nihub_qa_group_id);
nihub_qa_tables:
CREATE TABLE nihub_qa_tables
(
nihub_qa_tables_id NUMBER NOT NULL,
table_name VARCHAR2 (250 BYTES),
last_date_loaded DATE,
last_row_count NUMBER,
avg_records_loaded NUMBER,
check_avg CHAR (1 BYTE),
check_orphan CHAR (1 BYTE),
check_domains CHAR (1 BYTE),
check_date CHAR (1 BYTE),
threshold_plus NUMBER,
threshold_minus NUMBER,
date_column VARCHAR2 (255 BYTES)
)
;
ALTER TABLE nihub_qa_tables
ADD CONSTRAINT "nihub_qa_tables PK" PRIMARY KEY (nihub_qa_tables_id);
and nihub_qa_table_tree_v is a point of view:
VIEW to CREATE or REPLACE nihub_qa_table_tree_v (nihub_qa_group_id,
nihub_qa_tables_id,
table_name)
IN SELECT
nihub_group_table.nihub_qa_group_id,
nihub_group_table.nihub_qa_tables_id,
nihub_qa_tables.table_name
Of
nihub_group_table nihub_group_table,
nihub_qa_tables nihub_qa_tables
WHERE
nihub_group_table.nihub_qa_tables_id = nihub_qa_tables.nihub_qa_tables_id;
nihub_group_table is a correlator group_id and tables_id to support the relationship m:m. when I run the query in Toad or sql command in the APEX, I get:
1 1 UNICA - 10000. -
2 0 NIHUB_NETINSIGHT_VEIW_PARAMS - 10000:20000 -.
2 0 NIHUB_NETINSIGHT_VIEWS - 10000:10000 -.
2 0 NIHUB_NETINSIGHT_VISITS - 10000:30000 -.
2 0 NIHUB_NETINSIGHT_VISIT_PARAMS - 10000:40000 -.
1 GROUP 1 TEST - 20000 -.
2 0 NIHUB_NETINSIGHT_VIEWS - 20000:10000 -.
that is what I expect. Here, any help would be appreciated.
Thanks in advance
PAMHere is a document to create a tree in APEX 4 via a wizard: http://apex.oracle.com/i/doc/tree_query_create.htm#BABJAGJJ
Thank you
Tony Miller
Webster, TXWhile it is true that technology is waiting for no man; stupidity always stops to accommodate new passengers.
If you answer this question, please mark the thread as closed and give points where won...
-
APEX 4.0 version page 3.2 Edit Scheme
I have been using APEX (Application Express 4.0.0.00.46) 4.0 since July 2010. All of a sudden, yesterday, page editing application (Page Rendering, processing Page and the shared components) began to show as he used to APEX 3.2 vs the tree see Apex 4.0. Now, the section of page edit poster Page, any region, buttons, articles, etc. in its own box with icons to create change all, copy, as described in 3.2.
Does anyone have any ideas as to why this is happening and how to fix it?
Thank youSwitch to tree view:
A button in the upper left corner of the page- the same panel as the run button.
HTH
ThomasPublished by: thomaso 17 January 2011 17:21
-
Vertical scroll bar in a tree node
Hi friends,
I am trying to create a tree in Apex 4.0. I need a vertical scroll bar in my flowchart if no: values is greater than 8. For example, I have a tree with customers and sites. When I press the clients it will list sites for this customer. I need a vertical scroll bar is displayed for the sites if no: sites is greater than 8, so I can limit the size of the tree. Are there ways to achieve Apex 4.0. Any entry for this will be appreciated.
Thank you
NAVYou could combine all these properties in one class (inline of the div & fix Andy's IE styles) and assign it to the div.
div.tree_scroll_div{ overflow-y: auto; display: block; min-height: 10px; _height: 10px; }
+ Note: _hieght * gets ignored by all browsers except IE, it considers the height itself (CSS Hack). +
-
Link to tree conditional to the region of the page
Hello
I'm still stuggling with the tree;).
I have a view from tree:
CREATE OR REPLACE FORCE VIEW 'LIB_TREE' ('ID', 'PID',
'NAME', 'LINK', 'A1', 'A2') AS
SELECT
1 id,
NULL pid,
'Documents '.
name,
null link,
null a1,
null A2
Of
Double
UNION ALL
SELECT
id_dept + 100000 id,
1 the nest.
Department
name,
null link,
null a1,
null
A2
Of
lib_dept
UNION ALL
SELECT
id_cat + 200000 ID.
id_dept + 100000 pid,
name of the category,
null
link,
null a1,
null A2
Of
lib_categories
UNION ALL
SELECT
id_doc,
id_category + 200000 pid,
name of the document,
null link,
null
A1,
null A2
Of
lib_documents
/
So, I get:
LINK code A1, A21 - Documents - PID NAME
100003 1 dept1-
1 100004 dept2-
100001 1 dept3-
100002 1 dept4-
200001 100001 contract-
200002 100004 project-
7343514157589715 200003 basket.php-
7347221195799935 200003 index.php-
Query tree finally:
SELECT
ID 'ID.',
"PID" pid,
'Name',
? p = & APP_ID.:28: & SESSION. : NO::P28_ID_DOC :'|| "" Link ID ".
null a1,
null A2
Of
"#OWNER # '." LIB_TREE ".
I have 2 problems. First is the link in a query (P28_TREE_ROOT) of the tree. In this version, I have links on each level, categories and departments are links and documents (files) that are in the hierarchy from the bottom and actually should be links. Question is: how to make a conditional link column in a query of the tree?
Second problem is related to a sql database report in an area on page 28 (the same as the tree). The report is a simple SELECT query on a table of documents which, in consequence, gives all columns and all rows of the table. Question is: what is the condition WHERE should I do, to have only one line in the result, which would rank code of the document that has been clicked on a tree.
Otherwise superior trees then documents could be links that give as a result with all report documents of the clicked Department or category...
Thaks for help.
Blazej
Published by: TheJoshuaTree on March 11, 2009 17:54Hello
First of all, as you create a view that sees all three tables, you can add another field in each select statement that identifies the level involved. You can then use a CASE WHEN... Sql statement of PURPOSE for the LINK in your tree. You could, of course, create the LINK on selects it individual - even if it means hardcode the links within the sql view. If you set the LINK to set two values on your page - one indicator to identify the level and the other for the ID, then you have your report based on something like:
SELECT ... FROM ... WHERE (:P1_FLAG = 'X' AND ID_DOC = :P1_ID) OR (:P1_FLAG = 'C' AND ID_DOC IN (SELECT ID FROM LIB_TREE WHERE PID = :P1_ID) OR (:P1_FLAG = 'D' AND ID_DOC IN (SELECT ID FROM LIB_TREE WHERE PID IN (SELECT ID FROM LIB_TREE WHERE PID = :P1_ID))
There may be even simpler means using the SQL features own tree (see the CONNECT BY clause in SELECT statements: [http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries003.htm#sthref3139] - that is, in my view, how are constructed trees of Apex).
Andy
-
How to change the region to fit on a single page when printing.
Hi all
I am only recently starting my APEX trip (and I am sure that this is where I want to stay!) please excuse any "dumb" comments I can do!
I use APEX 5.0.3 and the universal theme.
I followed the steps kindly provided by Christian Rokkitta on the following blog to create a tree of the Organization;
Oracle & Apex Geekery: CSS3 Pure Org-tree with APEX list
I only have a CSS and JavaScript knowledge, but did successfully a number of changes to meet our specific requirements. Where I fight, it's around areas of printing that do not fit on one page.
I tried to edit the CSS, I tried to use JavaScript to open in a new window pop up, I have drawn on Print Style sheets and am currently using a modified version of the 'Standard' page template so that I can use @media Print to stop certain elements display. The CSS before I tried to use breaks page and updated scale, but after 4 days of work on anything else, but this printing problem, I'm starting to wonder if I go about it completely the wrong way.
What is someone is able to help with the above? Basically, I need to make the organization chart fit on the single page when printing. almost as if I had 'zoom out' until it is on a single page and then print.
I have refrained to put links or screenshots however please let me know if you need more information and I'll get it right above!
Thanks to you all!
Richard
Check page 4 where I added the bottom of specific statements of style for printing.
@media print { .tree li a { /*font-size: 15px;*/ font-size: 0.8rem; line-height: 1rem; border: 1px solid #000000; } .tree ol, .tree ul { margin: 0; } .tree li::before, .tree li::after { border-top: 1px solid #000000; } .tree li::after { border-left: 1px solid #000000; } .tree li:last-child::before { border-right: 1px solid #000000; } }
Maybe you are looking for
-
I installed Sunbird in a computer and my calendar has all my info, events and task that I would like to see on another computer I just download Sunbird in. Also, is it possible that I can access Sunbird on my iphone?Thank you in advance,
-
I anticipate get me the new ThinkPad T410, but I need to know one thing. The integrated video graphics card is the following; Intel Graphics Media Accelerator 5700MHD - AMT What is the max resolution that can be set to when the laptop is connected to
-
ThinkPad tablet does not see 3.5 OTA update?
Hi guys,. trying to update mine and I can hit "check for updates" for always and always get the message "your software is up-to-date. tried to restart the Tablet, powered off and on again, reload and checking all connected/disconnected from the compu
-
I just bought a fancy 4-1010. Friendly and quick, but I want to upgrade. I just want to add an ssd and some more RAM for it, but I can't open back cover without destroying it (I think) How to open the cover back so I can access the internal organs of
-
VLAN to the internet does not.
Hello I just the 6248. VLAN 1: 10.0.1.1/24 VLAN 300: 10.254.0.1/24 Gateway: 10.254.0.10 //residing on VLAN 300 I can ping to the gateway of the VLAN 1, I can ping hosts on VLAN 1 from VLAN 300, but I can't access internet from VLAN 1. VLAN 300 has n