struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject RE: Validator won't validate single required field
Date Fri, 24 Jan 2003 20:52:18 GMT
You wouldn't want to hit the JSP first anyways ;-).  I believe both of your 
thoughts will work but I would try the separate action mapping idea first.

David






>From: Wendy Smoak <Wendy.Smoak@asu.edu>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: 'Struts Users Mailing List' <struts-user@jakarta.apache.org>
>Subject: RE: Validator won't validate single required field
>Date: Fri, 24 Jan 2003 12:57:39 -0700
>
> > You probably forgot to say validate="false" in your action mapping for
> > whatever action is initially displaying the page.
>
>Only one action displays the page:  ChooseProfileAction, mapped as:
>
><action    path="/chooseProfile"
>                type="edu.asu.vpia.struts.ChooseProfileAction"
>                name="chooseProfileForm"
>                scope="request"
>                validate="true"
>                input="choose.profile">
>        <forward name="success"         path="/viewProfile.do" />
>        <forward name="resolution"      path="/resolveName.do" />
>     </action>
>
>This hasn't been a problem until I tried to use validation.  Since my JSP's
>are stored under WEB-INF, I can't go directly to the JSP first and then to
>the action only on submit.
>
>So... could I duplicate the above mapping, but use a path such as
>/chooseProfileInitial and turn validation off when that path is used?
>
>The other thing I was considering is placing a token in the session and
>overriding validate() [I think, haven't looked at the ValidateAction 
>javadoc
>yet] only calling super.validate() if the token is present, which it won't
>be on the first access.
>
>--
>Wendy Smoak
>Applications Systems Analyst, Sr.
>Arizona State University PA Information Resources Management


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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


Mime
View raw message