Hi
I am validating the contents of an ActionForm in an Action. I am basically doing this
process
--------------------------------------
TestFormFactory tmpTestFormFactory = new TestFormFactory((TestFormBean) form );
ActionErrors errors = tmpTestFormFactory.getErrors();
//this getErrors() method will look for errors, and also clean the form data in
//the way I have written below
if ( errors.size() > 0 )
{
TestFormBean tmpTestFormBean = tmpTestFormFactory.getCleanedTestFormBean()
//Above line is to get a cleaned version of the ActionForm data the user
//entered. Ie, in a newUser screen if a user enters a userName which already
//exists, I would set the value of userName in the form to ""
..
..
//set the tmpTestFormBean as the form and a few other things
return(new ActionForward(mapping.getInput()));
}
Is there a cleaner way to do this? Is there a better way to do this.
Any comments appreciated.
--
Cheers
Tony。
---------------------------------------------------------------------
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Cheers
Tony。
---------------------------------------------------------------------
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>