Hi,

I have the following scenario running with an application:

1. A setup action gets called and a form bean gets created, some lists in the form bean are populated with collections and then the whole mess gets sent to the user.

2. The user fills out the form and clicks save.

3. A save action gets called but before that, validation happens (the form bean extends ValidatorForm) and finds the user forgot to enter a title. The user is forwarded to the form jsp to correct the error but the collections are no longer available.

4. Huge error ensues, user is mad, money is lost.

After doing some research it seems that I have a couple of options:

1. When validation fails, return the user to an action instead of directly to the jsp. Said action can repopulate the list and things are good to go.

2. Session scope the form bean.

3. Use AJAX to populate the collections on the form and forgetaboutit.

Are there best practices for this sort of thing? Am I missing anything else?

Thanks in advance for your help.

Cheers,

Jon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to