Sunday, August 28, 2011

Cannot use a region in a page more than one time?

In our application we use regions for reusability and consistency.
For example we have An address region that we reuse in order to show and edit a person address and a company address. We pass the address owner as a parameter to the region in order to show corresponding data.

Yet if regions are placed in the same page then both regions show the same data even if they get different parameters.

This is because of automatic application modules nesting.
The framework see that AddressModule is already in data control and it use the same for both regions due to shared data control scope.

It does not happen if we don't use shared data control scope, yet then we have a different database connection for each region. It does not seems right to have different connection to get different data!!?

In the test case i have a simple Department Task flow that query for specific department depending on passed parameter inDepId


Then in a page i place the same region 2 times with different parameter passed in each region.
Yet when i run the application both regions show the same data.



Is there a way to show different data without having different database connection?

Test Case:

http://adfbugs.googlecode.com/files/TestRegions.rar

3 comments:

  1. I guess you'll need to use different ViewObject instances...

    ReplyDelete
  2. Not a bug - just a missing know how: See https://blogs.oracle.com/groundside/entry/maintaining_row_currency_separation_in

    ReplyDelete
  3. Hello Frank
    Thank you for your post
    IMO all bugs are missing know how :)
    We are using similar workaround found in http://jobinesh.blogspot.com/2011/09/forcing-task-flow-instances-with-shared.html
    May be this solution should come out of the box
    Thanks

    ReplyDelete