Selecting a Row in a Table to Pass to Another Page

This is another common scenario when you are working in ADF, which is quite well documented in the 10.1.3 release, but a quick scan didn't bring up an example of how to do it in 11g - so I created this little video.

The basic scenario - you show some records in a table and you want to select one of them and edit it in another page - so what you need to do is set the specific row you are going to use in the first page and then tell the second page to use it.
The way to do it when you are working with ADF BC is to use the setCurrentRowWithKey (or setCurrentRowWithKeyValue).
The difference between the two is explained here.

So here is how you do it:

Note - if you need to do this between two different Views check this blog entry.

Comments:

Hi, tks for the example. I have a question. If in the edit form you navigate to another record, when you return to the table it's is positioned in the record that you clicked to go to the edit form. I tried to insert an return button with action listener to a setCurrenRowWithKey just like when I go from the table to the edit form. Any suggestions? Tks.

Posted by Sarto on April 27, 2009 at 12:23 AM PDT #

Hi I want to achieve same things but with difference view object. let say , both are difference view object and different page def. adf table : employeeview object1 adf form : employeeviewobject2 How to set iterator of employee view 1 to empoyee view 2 using employee_id. thanks,

Posted by hasim on May 11, 2010 at 01:51 AM PDT #

This is what I showed in this blog entry: http://blogs.oracle.com/shay/2009/11/passing_value_between_pages_to.html

Posted by shay.shmeltzer on May 11, 2010 at 03:57 AM PDT #

Hi,

This is a good tutorial. Can you tell me how can I possibly make the link action 'getDetail? did you create this as a separate manage bean?

Thanks!

Posted by Den on July 04, 2011 at 04:04 PM PDT #

Den, getDetails is the name of the navigation rule that is defined in your page flow.

Posted by Shay on July 05, 2011 at 08:57 AM PDT #

Hi Shay,

After I set the navigation rule (getProduct)in the action attribute of commandlink, I get this error when I clicked a commandlink in the table : "View row with key oracle.jbo.Key[10163754] is not found in OrderdetailViewIterator"

Should I add something in OrderdetailViewIterator?

Posted by Den on July 05, 2011 at 02:36 PM PDT #

Den, check out which value you are passing to the setCurrentRow operation - read the doc to find out what is the right value for each operation.

Posted by Shay on July 07, 2011 at 02:36 AM PDT #

But this works automatically without setCurrentRowWithKeyValue

Posted by guest on May 07, 2013 at 11:53 PM PDT #

Hi Shay,
I tried the setCurrentRowWithKeyValue method and it is navigating to the next page.
But, after pressing back and coming to the first page if I press on another link, it goes to the next page with the previously entered values itself.

I am using JDeveloper 12c.

Thanks
Nigel.

Posted by Nigel Thomas on September 13, 2013 at 04:40 AM 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