struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dakota Jack <dakota.j...@gmail.com>
Subject Re: Help Validating Accepted/Not Accepted radio buttons
Date Thu, 02 Dec 2004 23:14:01 GMT
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 <java@wendysmoak.com> wrote:
> From: "Jeff Beal" <jbeal@webmedx.com>
> 
> 
> > 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" <jbarrows@sssc.com>
> >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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 


"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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message