You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinh Tran <vi...@processintelligence.com> on 2003/03/13 19:36:34 UTC

Retrieving Request Values After Validation (DynaValidatorForm)

I finally have the time to experiment with DynaValidatorForm.  Thanks to
Rick Reumann's tutorials I have been able to figure out DynaValidatorForms
and Validator.  Unfortunately I've encountered a problem with retrieving
request parameters after validation has occurred.

Like lesson 3 in Rick's tutorial, I have a SetupMyFormAction in which I
prepopulate the form.  In this class I also set some supporting request
values, request.setAttribute("myattr", somevalue),  for the corresponding
JSP form page.  After validation I am forwarded back to my form but my
supporting request parameters are no longer available.  I understand why
they would no longer exist but I am unsure as to where to reset these
request values after validation.

Vinh

RE: Retrieving Request Values After Validation (DynaValidatorForm)

Posted by Vinh Tran <vi...@processintelligence.com>.
I may try that...for now i decided to put the attributes in session and
remove them after CRUD.  I don't like clogging up the session if I don't
have to so I may try your approach.

Thanks.

-----Original Message-----
From: Robert Taylor [mailto:rtaylor@mulework.com]
Sent: Thursday, March 13, 2003 1:57 PM
To: Struts Users Mailing List; vinht@processintelligence.com
Subject: RE: Retrieving Request Values After Validation
(DynaValidatorForm)


One solution is to assign the URI of SetupMyFormAction as the
input instead of the .jsp page. By doing this, Struts will
forward the user to SetupMyFormAction if validation error occurs
which will prepopulate the form accordingly but will also retain
the users input.

robert

> -----Original Message-----
> From: Vinh Tran [mailto:vinht@processintelligence.com]
> Sent: Thursday, March 13, 2003 1:37 PM
> To: struts-user@jakarta.apache.org
> Subject: Retrieving Request Values After Validation (DynaValidatorForm)
>
>
> I finally have the time to experiment with DynaValidatorForm.  Thanks to
> Rick Reumann's tutorials I have been able to figure out DynaValidatorForms
> and Validator.  Unfortunately I've encountered a problem with retrieving
> request parameters after validation has occurred.
>
> Like lesson 3 in Rick's tutorial, I have a SetupMyFormAction in which I
> prepopulate the form.  In this class I also set some supporting request
> values, request.setAttribute("myattr", somevalue),  for the corresponding
> JSP form page.  After validation I am forwarded back to my form but my
> supporting request parameters are no longer available.  I understand why
> they would no longer exist but I am unsure as to where to reset these
> request values after validation.
>
> Vinh
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Retrieving Request Values After Validation (DynaValidatorForm)

Posted by Robert Taylor <rt...@mulework.com>.
One solution is to assign the URI of SetupMyFormAction as the
input instead of the .jsp page. By doing this, Struts will
forward the user to SetupMyFormAction if validation error occurs
which will prepopulate the form accordingly but will also retain
the users input.

robert

> -----Original Message-----
> From: Vinh Tran [mailto:vinht@processintelligence.com]
> Sent: Thursday, March 13, 2003 1:37 PM
> To: struts-user@jakarta.apache.org
> Subject: Retrieving Request Values After Validation (DynaValidatorForm)
>
>
> I finally have the time to experiment with DynaValidatorForm.  Thanks to
> Rick Reumann's tutorials I have been able to figure out DynaValidatorForms
> and Validator.  Unfortunately I've encountered a problem with retrieving
> request parameters after validation has occurred.
>
> Like lesson 3 in Rick's tutorial, I have a SetupMyFormAction in which I
> prepopulate the form.  In this class I also set some supporting request
> values, request.setAttribute("myattr", somevalue),  for the corresponding
> JSP form page.  After validation I am forwarded back to my form but my
> supporting request parameters are no longer available.  I understand why
> they would no longer exist but I am unsure as to where to reset these
> request values after validation.
>
> Vinh
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org