tags:

views:

39

answers:

2

Hi Guys,

I have a requirement in jsp , an user can enter details in one screen and screen to follow, and has next and previous button to go to next screen. When he clicks on next button , he goes to another screen where he enters or modify some details and similarly he clicks on next button,till the final screen where he asked to confirm the details entered. once confirmed the data will be saved to database. my question is , how to know whether user has changed the values in one screen, how can i prompt him to save the values before going to next screen(technical answer).kindly let me know what is the best way to implement (save on every screen or save at the end ), kindly give the best solutions.

what i have thought is , to hold the changed data in the HttpSession or to have Stateful session bean to hold values , so that even if the session is expired ,he can login and start from the place where he has stopped.

Expecting quick reply.

A: 

I've done this in two ways:

1) Session state. This gets a bit horrible due to the stateless nature of the web - your first wizard page would need to ensure any leftover state is removed. Also, you can get into trouble if you're load-balancing.

2) Implement hidden divs on the form, and don't submit until the very end. This means you don't have to wait for postbacks, and you just hide a div and show the next one. All done with JavaScript.

By the way, it's not really very sporting to say things like "Expecting a quick reply". People here are helping for free, you will get people's backs up if you take it for granted. Just wanted to mention it.

Neil Barnwell
apologize for having written quick reply
A: 

Try what you have suggested above. If you run into trouble people will be willing to help you out here. I go along with Neil drop your expecting quick response from your question.

Paul Whelan
paul, you suggest the hidden div
No try what you suggested in your question
Paul Whelan
ok , you mean the HttpSession solution or Stateful session solution