Friday, March 4, 2011

Using Popup to Confront user to Save/Forget Changes

This is an example topic followed by the previous post. Here I am presenting an example that using a popup to confront the user to save or forget the pending changes when navigate to different frame.

The example can be download from here. The example is based on Andrejus Baranovskis's example on how to detect pending changes using dynamic regions. What Andrejus did for pending changes is to throw an Warning message, but I came up with a scenario that to confront the user with popup and let use to choose either stay on the page or go ahead forget the change for the next frame.

1. How the pending changes are detected through ADF controller layer.

2. How to navigate to a different frame in dynamic region. If there are pending changes, the popup will be thrown to the user.

3. How to handle the logics if the user choose to forget the pending changes and navigate away.

4. Main.jspx page structure:

Here are the UI of this example:

1. Make some changes on the location flow.

2. Navigate to a different frame - Department Flow.

3. A warning pop up has been thrown.

4. User choose to forget the changes and successfully navigate to department flow.

5. Go back to the location flow and pending changes have been wiped out.

No comments: