ADF – warn about changes

It is a very common requirement in any application to warn about changes when a user is going away from a transaction page without applying the data.
To achieve this, uncommittedDataWarning="on" must be set on document tag.

And if the user wants to go away from the page without saving, we also need to do rollback on the data. But if the data is rolled back, uncommittedDataWarning will not work as there wont be any pending changes anymore after rollback.
So in such case, instead of doing rollback in actionlistener or action of the navigation button, rollback should be included in adfc-config after navigating away from page. (i.e after user clicks on OK button of warning popup).

Steps to do this :
1. Right click on adfc-config , Insert inside ADF Task Flow –> ADF Task Flow –> Method Call.
2. Give some unique Activity Id
3. select from expression builder, the rollback binding from ur page definition
4. Give an outcome to navigate to destination.
5. Now add a control flow between source page and this method call , and another control flow from this method call to destination page.

This way rollback is achieved before navigating to destination page and after the warning message.

http://www.oracle.com/technetwork/developer-tools/adf/unsaveddatawarning-100139.html

Advertisements
This entry was posted in ADF. Bookmark the permalink.

One Response to ADF – warn about changes

  1. Exactly how much time did it acquire you to create “ADF – warn about changes | The Digital Space !
    !”? It includes a good deal of fantastic knowledge. Thank you ,Rogelio

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s