Hi,

I am having a problem with the javascript that is generated by the
validator framework. 

** JAVASCRIPT **

Here is a snippet of the generated javascript

    function validate/testAction(form) {                             
                                     
        if (bCancel) 
      return true; 
        else 
       return validateRequired(form) && validateMinLength(form) &&
validateMask(form); 
   } 

Looking at the above snippet, the function name is invalid (contains
a /)

** VALIDATOR.XML **
Here is a snippet from my validator.xml file.

        <form name="/testAction">
            <field property="value(name)" depends="required,
minlength">
                <var>
                    <var-name>minlength</var-name>
                    <var-value>5</var-value>
                </var>
                <arg0 key="Name" resource="false">
        </form>


I use a Map-based ActionForm for this Action. Also, I have specified
the ActionMapping path as the form name because this ActionForm is
shared between many Actions. 

Check out
http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
for more information on this.

The server-side validations work fine but looks like the client-side
javascript creation needs to be updated to use a different name in
case the form name uses an Action path (containing /). 

Has anyone else seen this problem ? This could possibly be a bug in
Struts.

Ashwin.



=====
Ashwin Desai.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to