DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560

JavascriptValidatorTag creates invalida javascript method name when validating using 
action path in formName

           Summary: JavascriptValidatorTag creates invalida javascript
                    method name when validating using action path in
                    formName
           Product: Struts
           Version: 1.1 RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using DynaValidatorActionForm and if you want to enable both javascript 
and server-side validation using the same validation definition then you need 
to use the action-mapping path as the formName attribute of the html:javascript 
tag. Because the default method name given to the form's javascript validator 
the is 'validate' + formName the forward slash causes an error in the page. 

I've resolved this in my version of the code by replacing the forward slash 
with underscore and viceversa when refering to the javascript validation method 
in the form's onclick.

e.g.
&lt;html:form action="newClaimInitial.do" onsubmit="if (!
validate_newClaimInitial(this)) return false;"&gt;
&lt;html:javascript formName="/newClaimInitial"/&gt;

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

Reply via email to