Okay, it sounded like you were just concerned with server-side validation. Try something like:
<head> <html:javascript formName="/action/path" method="validateForm"/> ... </head> <body> ... <html:form action="/action/path" onsubmit="return validateForm(this);"> ... </body> There are other best practices for organizing the "static" JavaScript, but try to get something working before worrying about that... Quoting Adam Hardy <[EMAIL PROTECTED]>: > In that case then there won't be any javascript validation set up > automatically! > > Is that the only difference between DynaValidatorActionForm and > DynaValidatorForm? > > I still haven't got this working. although I'm one step further. > > > > Kris Schneider wrote: > > If you're using DynaValidatorActionForm, the name attribute of the form > element > > in validation.xml should be the same as the path attribute of the action > element > > in struts-config.xml. > > > > Quoting Adam Hardy <[EMAIL PROTECTED]>: > > > > > >>Hmm., just realised the name of the form here is actually the action > >>mapping path. Should I be naming the forms in validation.xml after the > >>action mappings then rather than the form-beans from struts-config? > >> > >> > >>Adam Hardy wrote: > >> > >>>I set up the Validator to do automatic validation with normal action > >>>forms and it worked fine. > >>> > >>>Now I'm trying to incorporate dynaforms but I'm not having any luck. I'm > > >>>not getting server-side validation carried out. > >>> > >>>I see from delving into the source code for struts and commons-validator > > >>>that the DynaValidatorAction form .validate() method is being called, > >>>but that the following line: > >>> > >>> Form form = resources.get(locale, formName); (578) > >>> > >>>returns a null form and so the validation is skipped. > >>> > >>>I've obviously missed something out on the set-up and config, but what? > >>>Can anybody cast a light on this? Meanwhile I'll carry on digging.... > >>> > >>>thanks > >>>Adam > >>> > >>>(struts 1.1 & validator 1.0.2) -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

