You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kevin Gibbs <ke...@gibbsonline.co.uk> on 2002/04/08 18:46:22 UTC
Bean Validation
Hi everyone - first time posting, please be gentle with me!
Scenario:
=======
My ActionForm has *very* little validation in it, this has been left to the
"storage layer".
How can I return to the input form from the Action class, and leave the
inputted data on the screen i.e. Force a form validate() failure?
If I return "new ActionForward(a_Mapping.getInputForm());", the inputted data
does not appear on the screen.
Many Thanks - Kevin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Bean Validation
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Kevin" == Kevin Gibbs <ke...@gibbsonline.co.uk> writes:
Kevin> Hi everyone - first time posting, please be gentle with me!
Kevin> Scenario:
Kevin> =======
Kevin> My ActionForm has *very* little validation in it, this has been left to the
Kevin> "storage layer".
Kevin> How can I return to the input form from the Action class, and leave the
Kevin> inputted data on the screen i.e. Force a form validate() failure?
Kevin> If I return "new ActionForward(a_Mapping.getInputForm());", the inputted data
Kevin> does not appear on the screen.
Build an ActionErrors object, with one or more errors in it. Send it to the
Action.saveErrors() method.
After that, assuming your "input" attribute is properly set in the Action
definition, then you can return "new ActionForward(mapping.getInput())";
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>