At 2:55 PM -0400 9/8/05, rajiv verma wrote:
I am using struts 1.2 and my client side validations using based on action
rather than form are not working? Is there a bug in the 1.2 release. I have
worked previously with 1.1 and it used to work just fine.
In the validation file,
instead of

<form name="accountForm">

I could use

<form name="/accountAction">

If you have simply upgraded versions of Struts, this should not have broken; however, you may have run into one of the most unfortunate naming mistakes in Struts (probably worse than ActionErrors and ActionMessages!)

Struts provides several varieties of validation ActionForm classes which integrate with the commons-validator framework. The only difference between these varieties is the key which they use to lookup validation rules. Some use the name of the form bean, others use the action path

This wiki page attempts to explain some of the differences: http://wiki.apache.org/struts/ValidatorActionForms

Also, Niall's change of April, 2004 now enables other users to easily subclass Validator Form to use any variety of strategies to determine the validator rules key. (http://issues.apache.org/bugzilla/show_bug.cgi?id=28150)

Hope this helps.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex

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

Reply via email to