views:

24

answers:

0

Let's say I have a transactional application that consists of four pages:

  1. An origination page which uses POST parameters to initialize the application
  2. A transaction page where data additional data is captured
  3. A review page where data is reviewed
  4. A confirmation page where submitted data is confirmed

Assume request parameters via POST are passed from (1) to initialize the session which is created upon (2).

The application has both a cancel button and a submit button on pages (2) - (3). Both actions should trigger a data reset where any previous values held in request/session/page should be reset.

The obvious solution is to clear out session values in an actionListener on the submit button (3) in but if I do that, I will not have those values to display in the confirm page (4).

Another solution is to clear out data prior to entry to the application but if I do that, I potentially lose the request parameters.

Am I missing something obvious here? What is the best place to reset data in a transactional application such as mine.