Why not use the Validation framework (in nightly builds) to do it? It can do both client-side validation and server-side, it already contains the javascript methods and everything. Pretty slick stuff.
--- John Yu <[EMAIL PROTECTED]> wrote: > If client-side validation is preferred, one paradigm is: > > - use js to do client-side validation, > - don't do validation in Struts, and > - let your business logic do the final safe-guard to > throw exception if the values are invalid. > > The main consideration is the maintenance of the js code. > > > At 05:44 pm 25-10-2001 -0700, you wrote: > >Hi: > > > >Struts puts emaphasis on server-side validations. > >However, lotsa times it makes sense to do some > >validations before we hit the server. > > > >How the client side validations should be done while > >keeping the sanctity of the design principles for > >struts? Is it a good practice to use use JavaScript to > >do this? What are the possible ways to do this? > > > >TIA, > > > >Hitesh. > > > >__________________________________________________ > >Do You Yahoo!? > >Make a great connection at Yahoo! Personals. > >http://personals.yahoo.com > > -- > John Yu Scioworks Technologies > e: [EMAIL PROTECTED] w: +(65) 873 5989 > w: http://www.scioworks.com m: +(65) 9782 9610 > > Scioworks Camino - "Rapid WebApp Assembly for Struts" > __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com