Discussions
Categories
- 385.5K All Categories
- 4.9K Data
- 2.5K Big Data Appliance
- 2.4K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Expand tree not working in Apex 19.2?

Hello
Before I waste some other hours someone might confirm this is a bug in Apex...
Aim: I want to re-open a tree to the state where it was before I do the page reload.
There is an attribute called 'Selected Node Page Item' in the Attributes area of the tree widget. The inline help is very foggy about how it works nor there is an example:
This item is used to save tree state, by holding the value of the last selected node. The value of the selected node can be saved to the selected item via the node link attribute, or via a page process. When the page is reloaded, the tree is opened to the selected node value.
Exactly what I need, perfect! The big question here: What is meant by "value"? ID of the selected element in the tree, object, JQuery object, ... ? Only heaven knows...
So I create a hidden page item called P25_TREE_SELECT that will be filled with the 'value' to expand after page reload. Furthermore I set Selected Node Page Item to P25_TREE_SELECT.
I create a test button doing this in several Dynamic Actions:
-- Step 1: Set value to P25_TREE_SELECT
// Get tree
var tree = $( "#HIERARCHYTREE_tree" );
// Get adatapter data
var adapter = tree.treeView( "getNodeAdapter" );
// Get node of selection
var treeSelected = tree.treeView( "getSelectedNodes" );
// Option 1: Set selection as object
apex.item('P25_TREE_SELECT').setValue( treeSelected[0] );
// Option 2: Set ID of selected element in tree
apex.item("P25_TREE_SELECT").setValue( treeSelected[0].id );
-- Step 2: Make sure P25_TREE_SELECT is in session before page reload
BEGIN
APEX_UTIL.SET_SESSION_STATE('P25_TREE_SELECT', :P25_TREE_SELECT);
END;
-- Step 3: Page reload
location.reload();
After page reload the tree keeps closed, no matter I choose Option 1 or Option 2.
Anything else I have to send as "value" or did I miss anything? Any documentation or video showing how it should work (if it does)?
Regards