On 10/28/06, Laurie Harper <[EMAIL PROTECTED]> wrote:

Puneet Lakhina wrote:
> hi,
> I have the following scenario. I have a form that takes certain input.
This
> in effect goes through certain validations. Now what I want to do is in
> case
> of validation errors a seprarte page is displayed that lists all the
> errors,
> and asks the user to continue submitting the data ignoring the errors,
> or to
> go back to the form and change the data.
> My question is how do i submit the data from my error page (which is a
> different page), in case the user chooses to continue to submit ignoring
> the
> errors.
>
> So the flow is like this
>
> form submit-> if errors - >error page - >if continue ->submit data and
> store
> in Database.
>
> This continue functionality is what im unable to achieve because I dont
> know
> how to resubmit the same form values from the error page.
>
> Any clues??

I can think of at least two ways to do this:

1) use session scope for your form bean; wheter the user decides to
return and re-edit his data, or submit it, the data is still in the
session-scoped form


Thats what I did. Is that a good thing to do??

2) if you want to avoid using the session, you could serialize the
submitted data as hidden fields in the error page; then the user submits
that page, their inputs will be re-submitted from the hidden fields, and
thus available to the next action


Thought of this..but wouldnt that make  code maintanence a problem. I mean i
add a field to the old form..n il have to add it here..n so on... what do
you think??


There are probably other approaches too, but that should at least give
you a starting point.

L.


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


thanks

--
Puneet

Reply via email to