I located the problem.  It was a combination of two things.  

1) The names in my form  and the validation tag did not match.  I had
two of them matching but all three needed to match.

2) I was using the .5 build which has an imcomplete validation.xml file
and the format has changed since that build.

Once question I have for those developing enterprise applications is
how to managed the validation.xml file.  It seems that is contains
application specific information as well as enterprise specific
information.

It seems that the file contains javascript validation code which could
be used throughout the enterprise on a number of applications. It also
contains validation rules specific to the application that you are
deploying.  It seems that you either have to duplicate the javascript
code to deploy in multiple validation.xml files or you have to include
the validation rules for all applications in every validation.xml file. 
I realize you can cut and paste but this opens up possibilities for
making mistakes.  

Has anyone come up with a way to package the inline javascript so it
can be used in multiple validation.xml files and you only have to change
one file to add additional javascript functions.



Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:    (303 263-3044

>>> [EMAIL PROTECTED] 07/18/01 10:06AM >>>
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 <[EMAIL PROTECTED]> 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
> 
> >>> [EMAIL PROTECTED] 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
> 
> 
> 
> >>> [EMAIL PROTECTED] 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/

Reply via email to