You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rémy Giard <rg...@cogiscan.com> on 2002/12/17 17:15:01 UTC

ValidatorActionForm & JavaScript validateXXX() function name

Hi all,

We have been using the ValidatorActionForm to validate a form for a specific
action. The action called when submitting the form is "/config/Save". This
has been defined in the struts-config.xml and validation.xml files.

Server-side validation works properly and the JavaScript is generated when
we add the <html:javascript formName="/config/Save"> tag in the jsp. The
only problem is the name of the validation method:  "function
validate/config/Save(form)".  This is not a proper function name in
JavaScript.

We have traced the source of the defect in
JavascriptValidatorTag.getJavascriptBegin(). A better name for the method
would be "validateConfigSave" -- removing any "/" and capitalizing the
following letter.

Any opinions?

For now, we did not activate client-side validation.

Thanks
Rémy Giard
Cogiscan Inc.
50, rue de Gaspé, Bloc A5
Bromont, Québec, Canada
J2L 2N8


Re: ValidatorActionForm & JavaScript validateXXX() function name

Posted by Charlie Toohey <ct...@pacbell.net>.
I'm having the same problem --- did you ever get this resolved ?

None of the documentation even indicates that the javascript tag can 
reference an action path rather than an action name for the formName. It may 
be that client-side validation only works in conjunction with server-side 
valiation when using ValidatorForm (or DynaValidatorForm) and does not work 
in conjunction with ValidatorActionForm (or DynaValidatorActionForm).

Any validation gurus out there know the answer to this ?



On Tuesday 17 December 2002 08:15 am, Rémy Giard wrote:
> Hi all,
>
> We have been using the ValidatorActionForm to validate a form for a
> specific action. The action called when submitting the form is
> "/config/Save". This has been defined in the struts-config.xml and
> validation.xml files.
>
> Server-side validation works properly and the JavaScript is generated when
> we add the <html:javascript formName="/config/Save"> tag in the jsp. The
> only problem is the name of the validation method:  "function
> validate/config/Save(form)".  This is not a proper function name in
> JavaScript.
>
> We have traced the source of the defect in
> JavascriptValidatorTag.getJavascriptBegin(). A better name for the method
> would be "validateConfigSave" -- removing any "/" and capitalizing the
> following letter.
>
> Any opinions?
>
> For now, we did not activate client-side validation.
>
> Thanks
> Rémy Giard
> Cogiscan Inc.
> 50, rue de Gaspé, Bloc A5
> Bromont, Québec, Canada
> J2L 2N8

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>