This help, Wendy? <!--========================================================== ERRORS ===========================================================--> <logic:messagesPresent> <ul> <html:messages id='error'> <li> <bean:write name='error'/> </li> </html:messages> </ul> </logic:messagesPresent> <!--========================================================== MESSAGES ===========================================================--> <logic:messagesPresent message='true'> <ul> <html:messages id='message' message='true'> <li> <bean:write name='message'/> </li> </html:messages> </ul> </logic:messagesPresent>
Jack On Thu, 02 Dec 2004 15:41:43 -0700, Wendy Smoak <[EMAIL PROTECTED]> 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 { > > 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. > > From: "Jim Barrows" <[EMAIL PROTECTED]> > >Two ways: > > 1) with a mask, where the mask is "Y" or "Yy" > > > 2) validWhen, which I *think* goes something like this: > > The problem with both of these is that they just ask for <arg0> which is > generally the field label, and then complain that the 'field is invalid' or > (strangely) 'field is required'. (validWhen is using 'error.required'.) > > So I'm down to creating a custom "rule" copying validWhen but giving it a > different message, or just doing it manually in the Action, in which case I > think the info here will help: > http://wiki.apache.org/struts/StrutsDeprecatedActionErrors. > > > > Thanks! > -- > Wendy Smoak > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]