Whoops! You also asked where the Struts source code is. For 1.1 it's in:

RequestProcessor.processValidate

And I think to be correct for 1.1 I should've said:

forward = mapping.getInputForward()

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> Check out Action.saveErrors for saving the errors returned from your call to
> 
> validate:
> 
> saveErrors(request, null); // clear current errors if you want
> ActionErrors er = form.validate(mapping, request);
> if ((er != null) && (!er.isEmpty())) {
>   saveErrors(request, er);
>   forward = new ActionForward(mapping.getInput());
> }
> 
> Quoting Wendy Smoak <[EMAIL PROTECTED]>:
> 
> > 
> > Because I need to allow the user to come and go from the form before the
> > "final" submit, I need to hold off on validation until that point.  So
> I've
> > got validate="false" (that was a gotcha!) in the <action> tag and I'm now
> > in
> > my LookupDispatchAction doing the validation manually:
> > 
> > How does this look?
> > 
> >       request.removeAttribute("org.apache.struts.action.ERROR");
> >       ActionErrors er = ((ContactForm) form).validate(mapping, request);
> >       if ( !er.isEmpty() ) {
> >          request.setAttribute("org.apache.struts.action.ERROR", er);
> >          return ( mapping.findForward( "edit" ) );
> >       }
> > 
> > Can someone point me to where in the struts source code this is done
> > "automatically" when validate is set to true in the <action> tag?  I've
> > grepped through the source code for 'ERROR' but there was too much!
> > 
> > Thanks,
> > 
> > -- 
> > Wendy Smoak
> > http://sourceforge.net/projects/unidbtags 
> > 
> 
> 
> -- 
> Kris Schneider <mailto:kris@;dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
> 


-- 
Kris Schneider <mailto:kris@;dotech.com>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to