Passing Parameters to ADF Application through the URL

A common scenario, especially for people who are creating ADF applications that extend or integrate with other systems, is the need to call an ADF page and pass some parameters to it.

For example, suppose you are in Oracle E-Business Suite and you are looking at a department and you want to invoke an ADF page that will show you more details about this specific department.

To achieve this you can expose bounded taskflows with a URL and define parameters that the taskflow will accept on the URL line.
In the following demo I show how to create a taskflow that shows a filtered VO, and then how to call this taskflow using a URL and pass the parameter that controls the filtering.

Update - in some cases you don't need a full taskflow for this. Here is an entry that shows you a simpler approach if you just need to reference the parameter in the page itself.

Comments:

Hi, Shay, I am trying to build URL to pass parameters to ADF appliecation. I asked you questions before regarding using WSDL from Peoplesoft in the web app. It is kind of working now. Thank you! I use 'get' method to retrieve data from Peoplesoft and need to put parameters in the URL so that user do not need to enter it. Actually they can not enter it. I watched this demo. it shows to use view object. But mine is from WSDL and I do not see operation of ExecuteWithparams and etc. How can I create task flow? Thank you, Jeff

Posted by Jeff on October 06, 2010 at 10:57 AM PDT #

Jeff, This should basically be similar in terms of setting the taskflow and parameter. Instead of using the pageFlowScope parameter. Then directly set the pageflowscope parameter as the parameter for the Webservice executable in the binding of the page - see here: http://blogs.oracle.com/shay/2009/07/java_class_data_control_and_ad.html No need for a method call before that.

Posted by shay.shmeltzer on October 07, 2010 at 01:22 AM PDT #

Shay, I created a view object to pass the parameter. The SheetId was passed to the page successfully. I use a WSDL for data control. I want to bind the 'Get' executable to the parameter. I tried: ${bindings.SheetId.currentRow.dataProvider} or ${bindings.SheetId.inputValue} It did not work. What I did wrong? Thank you, Jeff

Posted by guest on October 18, 2010 at 07:39 AM PDT #

Jeff - you should post this type of question on the JDeveloper OTN discussion forum where more people can help you, and you should probably explain in more details what you are trying to achieve and what you have done. Also - you should try and set breakpoints in your code to see what is in the ELs that you are using at the point when you call a Web service.

Posted by shay.shmeltzer on October 18, 2010 at 08:07 AM PDT #

Hi Shay, How I could pass the parameter from JDeveloper 10G (Run on OC4J) to JDeveloper11G (run on weblogic) since we try to run JDeveloper 10G on weblogic was not successful. Any idea? Thanks Regards, Saiful

Posted by Saiful on October 25, 2010 at 12:19 PM PDT #

Saitful - this should basically be the same thing in your ADF 10g application just have a goLink with the destination containing the full URL with parameters.

Posted by shay.shmeltzer on October 26, 2010 at 05:53 AM PDT #

Hi Shay, This passing parameters through URL only work for bounded-taskflow with pages(.jspx) only. is it correct? But, typically ADF application home/dashboard page will be .jspx page which is in unbounded-task flow(adfc-config.xml). This home page will have a bounded task flow(which contains page fragments, .jsff) dragged as a region in it. And we can not pass parameters to unbounded task flows. So, if i have a ADF application with home page in adfc-config.xml, how can i pass parameters ? Please clarify

Posted by Subba on December 07, 2010 at 10:54 PM PST #

Subba, if you add a view to adfc-config.xml and click it - you'll see a parameters section in the property inspector. More here: http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/taskflows_parameters.htm#BACCEIAC

Posted by shay.shmeltzer on December 08, 2010 at 03:28 AM PST #

Is it possible to read a parameter from a post request instead of a get request

Posted by guest on August 25, 2011 at 04:32 PM PDT #

Thanks for that mate. It has been edited now.

Posted by case de pariuri online on November 17, 2011 at 11:20 PM PST #

Hi Shay,
this article is very useful.
i have similar usecase.adf page url is called from the OAF page
with some parameters like username and user group.
but this url parameters are encrypted .how do we read those encrypted parameters know how to decrypt those parameters but where will be the code exactly? before passing ADF

Posted by karnakar on January 11, 2012 at 03:41 AM PST #

Karnakar, I think this is more of a question to the OAF people to figure out how the information they pass can be decoded.
One thing you might want to look into if you are trying to do a joint security implementation between EBS and ADF is the usage of the EBS Java SDK Kit JAAS adapter, or possibly using Oracle Access Manager to define single-sign-on between the apps.

Posted by Shay on January 11, 2012 at 04:43 AM PST #

Hi Shay,
currently, we are not using OAM for SSO .URL parameters are passed to ADF with decrypted.i need to encrypt those parameters in my ADF page URL.
where will be encryption code goes here ?

Posted by Karnakar on January 11, 2012 at 01:49 PM PST #

Shay, how to do same thing when navigation is done by control-flow-rule from one page to 2nd page by af:commandLink in unbounded task flow.By using af:link its ok.

Posted by guest on May 21, 2012 at 08:50 AM PDT #

guest - in the af:commandLink you can add an af:setPropertyListener to set the value for the parameter in any specific scope you need.
http://docs.oracle.com/cd/E24001_01/apirefs.1111/e12419/tagdoc/af_setPropertyListener.html

Posted by Shay on May 21, 2012 at 09:34 AM PDT #

Shay,not working.I have page params in adfc-config frm yr example.
<from-value>#{param.p1}</from-value>
<to-value>#{viewScope.p2}</to-value>
From af:commandLink in setpropertyListener - From:#{1} & To:#{param.p1}
giving error 'not writable property'.When To:#{viewScope.p2} ,no value is coming as I put outputtext to test.

Posted by guest on May 22, 2012 at 01:49 AM PDT #

I followed all the steps but after deploying to weblogic server, Im getting Internal Server Error

Posted by guest on October 21, 2013 at 01:04 PM PDT #

guest - post your error and stack trace on the JDeveloper forum on OTN.

Posted by Shay on October 21, 2013 at 02:20 PM PDT #

Hallo Shay can i call URL with Task flow -run as dialog

Posted by guest on April 16, 2014 at 05:15 AM PDT #

guest -I'm not sure I understand your question.
Why not just create a taskflow call in your flow? and pass parameters to that flow.

Posted by Shay on April 16, 2014 at 02:09 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today