Reputation: 147
I wish to know the way to pass multiple values from a page to another and being stored in session.
The current generated URL is:
https://server_name/apex/f?p=285:20:SESSION_ID::NO:20:P21_ACTIVITY_NAME:1:P20_USER_NAME:APEX_USER
Actually I wanted to pass P21_ACTIVITY_NAME
and P20_USER_NAME
to another page, but with the URL mentioned above, the value of P21_ACTIVITY_NAME
in session is 1:P20_USER_NAME and value of P20_USER_NAME
is null
Upvotes: 2
Views: 18132
Reputation: 1138
Your URL is wrong.
Read https://docs.oracle.com/database/121/HTMDB/concept_url.htm#HTMDB03017
Right syntax should be like this:
https://server_name/apex/f?p=285:20:SESSION_ID::NO:20:P21_ACTIVITY_NAME,P20_USER_NAME:1,APEX_USER
Upvotes: 2
Reputation: 897
How about creating a global item in apex and setting the values of those items whenever you submit the page that sets the values? that way, you can refer to those items values in your whole session, from any page of your application.
I have another way of doing that using the browser's sessionStorage
. If you're interested then here's how:
set the static ID property of the button of the page that will redirect your page to another page. For the sake of this example, i will set it to "submitbutton".
Then in the Execute on Page Load
part of your page, enter the following lines:
$("#submitbutton").mousedown(function(){
sessionStorage.P20_ACTIVITY_NAME = $("#P20_ACTIVITY_NAME").val();
sessionStorage.P20_USER_NAME = $("#P20_USER_NAME").val();
});
You can refer to those values from another page through javascript like this:
sessionStorage.P20_ACTIVITY_NAME or sessionStorage.P20_USER_NAME
Here's an example:
document.getElementById("the_id_of_the_item_you_want_to_set_with_the_value_from_theotherpage").value = sessionStorage.P20_ACTIVITY_NAME;
the sample sets the value of the element in the current page from the value of the item from the previous page.
Upvotes: 0