Passing Parameters to an ADF Page through the URL - Part 2.

I showed before how to pass a parameter on the URL when invoking a taskflow (where the taskflow starts with a method call and then a page).
However in some simpler scenarios you don't actually need a full blown taskflow.
Instead you can use page level parameters defined for your page in the adfc-config.xml file.

So below is a demo of this technique.
I'm also taking advantage of this video to show the concept of a view object level service method and how to invoke it from your page.

P.S.
You might wonder - why not just reference #{param.amount} as the value set for the method parameter? Why do I need to copy it into a viewScope parameter?
The advantage of placing the value in the viewScope is that it is available even when the page went through several sumbits. For example if you switch the "partialSumbit" property of the "Next" button to false in the above example - the minute that you press the button to go to the next department - the param.amount value is gone.
However the ViewScope is still there as long as you stay on this page.

Comments:

Dear Shay, First of all, thank you for good example! It says me, that you know a lot about passing parameters and task flows. Could you please, help me to understand how to implement a Task Flow, that consists of Method Call as an entry (that uses URL parameter UserId) and then Router that switch application to the Application Page or to the Message Page (tells that this user can't login). I already started, and am able to use dummy Method Call that returns one constant user id, but cant understand how to access URL parameter inside this method! Thank you in advance for your time! Jelena

Posted by Jelena on February 06, 2011 at 11:40 AM PST #

Jelena, This entry shows how to have a taskflow with a method at the start that gets a parameter from the URL: http://blogs.oracle.com/shay/2010/10/passing_parameters_to_adf_appl.html

Posted by shay.shmeltzer on February 07, 2011 at 04:25 AM PST #

Hi Shay! Thanks for the demo! I have a question. Is it possible to convert the parameter "To Value" in expression language before it is handed over to my managed been? Br Casper Thrane

Posted by Casper Thrane on March 07, 2011 at 08:02 PM PST #

can you help me I am new to oracle ADF 11g .we are from oracle forms environment and now trying to redevelop our application in ADF 11g. I am searching one question on the web and unable to find best solution .Plz help me about this. My scenario is i have multiple forms on the same table having one flag(column) in table to differentiate data with each other. what will be the best way to implement it . one solution is i think to create individual view object with flag value in where clause and create pages for each. But i want to create a single page(as all have same functionality and similar data to insert ) and single EO and set value of that flag programmatic way based on user clicked on which link.

Posted by sat on May 28, 2011 at 07:40 PM PDT #

Sat - your scenario is not exactly clear to me - I would suggest posting this on the OTN discussion forum. Maybe what you are referring to is polymorphic VOs - see: http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#sm0515 But it might be that your scenario is a lot simpler.

Posted by Shay on May 31, 2011 at 09:21 AM PDT #

Hi Shay

Sorry for my English is the Google translate

I have an application that contain an accordion control in the left slide of an splitter and a Panel Tabbed on a right slide, a wish to change the Panel Tabbed when a do a click on the ShowDetailItem property of the Accordion Control but a don’t know how do this, I want a menu accordion dynamic.

Posted by guest on November 15, 2011 at 03:25 AM PST #

Hi Shay,

Is there a way to clean up the url of jsp page?

For e.g :
Currently my url is something like this: /MyApplication-ViewController-context-root/faces/sample?_afrWindowMode=0&param1=value&_afrLoop=1438133367660148&_adf.ctrl-state=16emihhfre_4

I would like it to be just : /MyApplication-ViewController-context-root/faces/sample?&param1=value

Can I remove these unwanted variables like _afrWindowMode, _adf.ctrl-state, etc.?

Thanks,
Sachin

Posted by guest on December 12, 2011 at 04:07 PM PST #

Hi Shay,
Any clues on the above query?

Thanks in advance,
Sachin

Posted by Sachin Gupta on December 14, 2011 at 10:31 PM PST #

Hi there Shay,

Nice idea, and I could possibly use this in a solution I have to come up with.

The video on the page, however, is missing.

We have to navigate to a specific page within our ADF application, for example. Open a product page with and show a product with a given sku.

We are using 12c for this application. Does 12c have a better way of doing this? Is your approach better and/or can you recommend a better way of doing this?

Thanks in advance

Posted by Tony De Buys on January 14, 2014 at 01:30 AM PST #

Tony - video is now back up on this page. This method should work in 12c as well.

Posted by Shay on January 14, 2014 at 10:54 AM PST #

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