I am using 1.1-b2 for two forms. Each form has it's own Form, Action, Validation.xml, 
ApplicationResources.properties and JSP files. The JSP's use the <html:javascript> tag 
to utilize the client side JavaScript validation methods. When the plug-in is 
configured like this:
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml, 
/WEB-INF/validation.xml,/WEB-INF/classes/com/myco/app1/app1Validation.xml, 
/WEB-INF/classes/com/myco/app2/app2Validation.xml" />
    </plug-in>

All of the validations seem to work correctly. However when it is configured like this:

    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml, 
/WEB-INF/validation.xml,/WEB-INF/classes/com/myco/app2/app2Validation.xml, 
/WEB-INF/classes/com/myco/app1/app1Validation.xml" />
    </plug-in>

When I navigate to /app2.do I end up with a bunch of JavaScript code dumped out on the 
page. 

When I look at the JSP source code when the form works the <html:javascript> is 
replaced by:

<SCRIPT LANGUAGE="Javascript1.1"> 
<!-- Begin 

     var bCancel = false; 

    function validateRmaForm(form) {                                                   
                
        if (bCancel) 
      return true; 
        else 
       return validateRequired(form) && validateEmail(form) && 
validateMaxLength(form); 
   } 
        ...snip...

When I look at the source code when it doesn't work the <html:javascript> is replaced 
by:
function validateMaxLength(form) {
                var bValid = true;
                var focusField = null;
                var i = 0;
                var fields = new Array();
        ...snip...

It does not start with the "normal" <SCRIPT> tag , nor the comment. Any ideas? Would 
the two Validatoin.xml files help in debugging? Is this a bug?

TIA

-Devin

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to