hi,

Wendy Smoak wrote:
> 
> From: "Jeff Beal" <[EMAIL PROTECTED]>
> > I'd just put that in the Action class instead of in validation.  It
> > seems like more of a "business" decision than a "validation" decision.
> > (After all, 'Y' and 'N' are both valid responses.)
> >
> > In Action:
> >
> > if ("Y".equals(myForm.getAccept)) {
> >    return mapping.findForward("accept")
> > } else {
       ActionMessages errors = new ActionMessages();
       errors.add(ActionMessages.GLOBAL_MESSAGE,
         new ActionMessage(Constants.ACCEPT_TERMS_ERROR));
       saveErrors(req,errors);
> >    return mapping.getInputForward();
> > }
> 
> It's not that simple... something about creating an ActionError and putting
> it somewhere so it will magically make the message appear on the page when I
> forward back to the input form.  I used to know how to do it, but then
> things changed.  And that's why I want to use Validator.

where Constants.ACCEPT_TERMS_ERROR is a key in the message properties file
should work.

-gm

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to