Shay Shmeltzer's Oracle Development Tools Tips

  • February 4, 2009

Selecting a Row in a Table to Pass to Another Page

Shay Shmeltzer
Director of Product Management - Oracle

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.

Join the discussion

Comments ( 9 )
  • Sarto Monday, April 27, 2009
    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?
  • hasim Tuesday, May 11, 2010
    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
  • shay.shmeltzer Tuesday, May 11, 2010
    This is what I showed in this blog entry: http://blogs.oracle.com/shay/2009/11/passing_value_between_pages_to.html
  • Den Monday, July 4, 2011


    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?


  • Shay Tuesday, July 5, 2011

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

  • Den Tuesday, July 5, 2011

    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?

  • Shay Thursday, July 7, 2011

    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.

  • guest Wednesday, May 8, 2013

    But this works automatically without setCurrentRowWithKeyValue

  • Nigel Thomas Friday, September 13, 2013

    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.



Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.