You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Winterfeldt <dw...@yahoo.com> on 2001/07/18 18:06:43 UTC

Re: Server Side Validation not firing for Validator when Java Script is off

The JavaScript part shouldn't have anything to do with
the server side other than it uses the same object in
application scope.  Does the name attribute of your
action (which matches the key the ActionForm is stored
under) in the struts-config.xml the same as the form
element's name attribute?  

    <action    path="/registration"
              
type="com.wintecinc.struts.example.validator.RegistrationAction"
               name="registrationForm"
               scope="request"
               validate="true"
               input="/registration.jsp">
       <forward name="success"             
path="/index.jsp"/>
    </action>

      <form    name="registrationForm">
      </form>

David

--- Scott Ryan <sc...@efirstbank.com> wrote:
> Yes I am extending ValidatorForm instead of
> ActionForm.  Did you mean
> ValidateForm or ValidatorForm.  
> 
> I originally commented out the validate method that
> I had but after
> nothing happened I tried creating a validate method
> that only called
> super.validate with the proper attributes but it
> returned an empty
> errors object.  
> 
> It almost appears that I have missed a flag
> somewhere.  It was easy to
> get the client side to work but unlike the rest of
> the user's I am
> having a problem getting the server side to fire
> correctly.  
> 
> I am going to try and remove the onsubmit from my
> jsp and see if the
> server side will fire then.
> 
> Thanks for your suggestions.
> 
> Scott Ryan
> Developer
> First Bank Data Corporation
> Work: (303) 235-1485
> Cell:    (303 263-3044
> 
> >>> rcornia@dced.state.ut.us 07/18/01 08:50AM >>>
> Are you extending ValidateForm instead of
> ActionForm?
> 
> If you have a validate method in your form, be sure
> to call
> super.validate().
> 
> Ryan
> 
> 
> 
> >>> scott.ryan@efirstbank.com 07/18/01 08:53AM >>>
> I am trying to use the Validator extension for
> struts.   I have the
> client side functioning correctly and it works
> great.  I then go into
> Netscape and turn off java script and the server
> side checking is not
> firing.  Am I missing some configuration parameter? 
> I even tried
> calling super.validate from a validate method within
> my ActionForm and
> this returned no information either.  Any ideas on
> where I can look?
> 
> Thanks
> 
> Scott Ryan
> Developer
> First Bank Data Corporation
> Work: (303) 235-1485
> Cell:    (303 263-3044


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/