struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: Bean Validation
Date Mon, 08 Apr 2002 17:21:59 GMT
>>>>> "Kevin" == Kevin Gibbs <kevin@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:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message