Reputation: 407
i've a basic tree region on my apex page. The Attribute "Selected Node Page Item" is set to a text input on the same page.
When I a select a tree element the defined text input remains empty.
Does anyone have an idea?
Upvotes: 0
Views: 4616
Reputation: 20778
To set the value of a PAGE ITEM called P1_SELECTED_NODE_ID on click, add the following LINK
column in the SELECT statement of your query:
SELECT
NODE_ID,
NODE_DISPLAY,
PARENT_NODE_ID,
'javascript:$s("P1_SELECTED_NODE_ID","' || NODE_ID || '")' LINK
FROM MY_TABLE
and then set the LINK column to LINK
in the tree attributes.
Upvotes: 1
Reputation: 227
Oracle APEX help about 'Selected Node Page Item' : "Select the page or application item that you wish to hold the selected node value. You can type in the name or pick from the list of available items.
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 tree is reloaded, the tree is opened to the selected node value."
So just setting this attribute wont get value there. You have to use some method (like link attribute of the tree)to store value to the item . The use of 'Selected Node Page Item' is to hold the session state value of the tree node so that if you navigate to some other page and come back to the tree page, the tree will open to the ''Selected Node Page Item' value instead of showing a fresh tree.
Upvotes: 4
Reputation: 421
Wouldn't the page item need to be Display-Only, rather than a Text Input? Why would you allow someone to edit the value you're pushing the Selected Node Page Item?
Upvotes: 0