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.


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: 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:

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.

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 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 #

Hi Shay ,

How can i pass the parameter on the sessionscope to the bind variable in the View Criteria , after click the button search

I have the query panel on the view page that is based on my view criteria as below ,

select * from table where idUser = :bind_idUser.

Posted by Kris on July 28, 2014 at 09:29 AM PDT #

Hi Shay,

I was trying it but I am getting error as showing in below error trace -
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT geog_territory.geog_territory_desc Territory,
geog_region.geog_region_desc Region,
geog_branch.geog_branch_desc Branch,
geog_customer.geog_customer_desc Customer,
NVL(geog_request_number.geog_quote_in, geog_request_number.geog_quote_num) Quote,
NVL(geog_request_number.geog_start_date_i, geog_request_number.geog_start_date_c) Start_Date,
NVL(geog_request_number.geog_dc_i, geog_request_number.geog_dc_c) Drilling_Curve_Days_per_well,
NVL(geog_request_number.geog_num_rigs_i, geog_request_number.geog_num_rigs_c) Number_of_Rigs,
NVL(geog_request_number.geog_pend_wells_i, geog_request_number.geog_exp_wells) Total_Pending_Wells,
geog_q_upd_chkbox SSO
FROM geog_request_number,
WHERE 1 = 1
AND geog_request_number.geog_territory_id = geog_territory.geog_territory_id
AND geog_request_number.geog_branch_id = geog_branch.geog_branch_id
AND geog_request_number.geog_customer_id = geog_customer.geog_customer_id
AND geog_request_number.geog_region_id = geog_region.geog_region_id
AND geog_request_number_id = :REQ_ID
at oracle.jbo.server.BaseSQLBuilderImpl.processException(
at oracle.jbo.server.OracleSQLBuilderImpl.processException(
at oracle.jbo.server.QueryCollection.buildResultSet(
at oracle.jbo.server.QueryCollection.executeQuery(
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(
at oracle.jbo.server.ViewRowSetImpl.execute(
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(
at oracle.jbo.server.ViewRowSetImpl.executeQuery(
at oracle.jbo.server.ViewObjectImpl.executeQuery(
at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingWithParams(
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(
at oracle.adf.model.binding.DCDataControl.invokeOperation(
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(
at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(
at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(
at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(
at oracle.adfinternal.controller.application.RemoteTaskFlowCallRequestHandler.invokeTaskFlowByUrl(
at oracle.adfinternal.controller.application.RemoteTaskFlowCallRequestHandler.doCreateView(
at oracle.adfinternal.controller.application.BaseRequestHandlerImpl.createView(
at org.apache.myfaces.trinidadinternal.application.InternalViewHandlingStrategy.createView(
at com.sun.faces.application.view.MultiViewHandler.createView(
at javax.faces.application.ViewHandlerWrapper.createView(
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.createView(
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.TailFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at Method)
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at oracle.dms.servlet.DMSServletFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at weblogic.servlet.internal.RequestEventsFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(
at weblogic.servlet.internal.WebAppServletContext$
at weblogic.servlet.internal.WebAppServletContext.securedExecute(
at weblogic.servlet.internal.WebAppServletContext.execute(
Caused by: java.sql.SQLException: Missing IN or OUT parameter at index:: 1

Can you please advise where I am doing wrong.

Posted by guest on December 17, 2014 at 10:02 AM PST #

guest - there is no way for me to help you without looking at your code. Try posting more details on the OTN ADF discussion forum.
And try and set a breakpoint on the method binding to see what value is in the parameter.

Posted by Shay on December 17, 2014 at 03:00 PM PST #

Pass Value across Application or Post to url

Posted by Hitesh on February 01, 2015 at 02:03 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

I'm a Director of Product Management for Oracle's Cloud Development Tools and Frameworks.
Follow me:

« July 2016