1
votes

I need to pass some query params from one apex app to another, so I am passing these as query params.

The format of an Oracle APEX URL is something along the lines of:

http://apex.oracle.com/pls/apex/f?p=AppId:PageId:Session:Request:Debug:ClearCache:Params:ParamValues:PrinterFriendly

And the URL I am passing looks something like:

http://apex.oracle.com/pls/apex/f?p=AppId:PageId:Session:MY_PARAM_NAME:MY_PARAM_VALUE

I'm constructing the url in javascript.

My questions are:

  • Does apex provide any Javascript utilities for constructing these URLs or am I on my own?
  • Also, on the receiving page end, how do I access these query params? Are there Apex javascript utilities that will let me grab all the query params?
  • If not javascript, is there another way I can access these query params?

Thanks.

2

2 Answers

2
votes

Is there a reason you use javascript to 'construct' the link? Can you not use a button/branch to redirect to the other application?
There is no javascript api to construct a url. You can find the documentation for the available javascript APIs here.

Constructing a link isn't that hard actually, provided you understand how it's build, and it seems you do. In any case, here is the oracle documentation.

To work with the parameters you pass on, you have to be aware that you're actually setting page item values. If you pass on P33_X,P33_Y:111,2222 to the target application (!, not page), but it does not have those items then you will receive an error:

ERR-1002 Unable to find item ID for item "X" in application "54687".

This would mean that you'd be able to grab the values of these items through javascript too, as long as they are on the page itself. Items in another page or application items can not be retrieved unless you use an on-demand process. You can easily fix that though by creating some hidden items with their source set to the appropriate item.

0
votes

Just in case you need access the HOST portion (http://www.example.com/) of the URL, you can look at this answer.