Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to handle _adf.ctrl-state being copied to second browser tab?

Evert-JanFeb 20 2014 — edited Jun 2 2014

Hi all,

I seem to have encountered a major bug that is causing data to override the wrong record in the database.

Here is the scenario:

  1. User is logged in to my ADF application with a UIShell pattern: This consists of a single JSF page with a menu and a region, the rest is all done through fragments and PPR.
  2. They have a simple form opened, and are looking at record 3.
  3. They open a second browser tab, and copy/paste the URL into that second tab (including the _adf.ctrl-state parameter).
  4. They immediately see the same state as the first browser tab (i.e. they see record 3), and then navigate to another record, number 4.
  5. They navigate back to the first browser tab, to still see the old record 3. Then they decide to update record 3.
  6. They hit save, and the updated fields end up in record 4 instead of 3.

Scary? Yes!

Essentially ADF gets confused because there are two browser windows sharing the same internal state, which should never happen anyway. It leads to severe date corruption as a result.

My questions:

1. Why does ADF not detect this problem right from the start? This must happen a lot as users tend to copy & paste URLs all the time.

2. How to tackle this problem in a nice & generic way? I can think of ways (by checking for new, non partial navigations with the same control state, or trying to use the viewscope), but am I really the first to have encountered this bug?

JDeveloper: 11.1.2.4.0

This post has been answered by Evert-Jan on Feb 21 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2014
Added on Feb 20 2014
4 comments
3,643 views