Thanks Max, I've just been looking at exactly the same area and I can
replicate the same error. It works fine in IE but fails in firefox.

I think you should enter it in JIRA.

Cheers

Theo


maxmil wrote:
> 
> I'm using 2.0.8 and using client side validation which its almost 
> working perfectly.
> 
> Unfortunately the only obstacle is that i can't put hidden fields in my 
> form. The validation works correctly the problem is that the second time 
> i validate the same form (without sending it to the server) the initial 
> error messages are not removed due to a faliure in the functions
> 
> I will explain...
> 
> When you set validate="true" in your form tag a javascript import to the 
> file struts/xhtml/validation.js is included in the page. This import 
> includes the function clearErrorMessages.
> 
> The idea is that this function should clear the error messages before 
> each validation. The way it works is by looking for the first element in 
> the form, it should be the field table, and then removing all rows which 
> have the attribute "errorFor".
> 
> The problem comes when you put hidden fields in the form. Regardless of 
> where you put them in the html in firefox they are always moved to the 
> top of the forms child elements in the dom tree. (This ocurrs in firefox 
> but not in IE where the function works correctly).
> 
> When the clearErrorMessages function finds that the first child of the 
> form is not a table but an input it returns without clearing the error 
> messages.
> 
> A solution would be to iterate over the form elements until the table is 
> found rather than expecting it to be the first element.
> 
> I think that this is a bug but i've not found anything in JIRA.
> 
> max
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Client-side-validation%2C-hidden-fields-and-clearErrorMessages-not-working-in-firefox-tf4028991.html#a11517491
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to