Hello guys!

I might need to bother you about this presumptive bug also.
Since you know I'm trying to produce a app that renders in XHTML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
(I use struts 2.3.15.3)
I got struts-user-input-validations in a form.
For eg one field is a email-address-field and must be filled in by the user.
So if I submit this form without any email-address there will be an error 
message.
I would like that that page would consist of valid xhtml as. A snippet from 
this page with the error message looks like:

25 <form id="productcommentssave" name="productcommentssave" 
action="/productcommentssave.action"
method="post">
26 <table class="wwFormTable">
27 <tr errorFor="productcommentssave_productComment_emailAddress">
28 <td align="center" valign="top" colspan="2"><span class="errorMessage">Email
address is required!</span></td>
29 </tr>
30 <tr>
31 <td align="left" valign="top" colspan="2"><label 
for="productcommentssave_productComment_emailAddress"
class="errorLabel">Email address:</label></td>
32 </tr>
33 <tr>
34 <td
35><input type="text" name="productComment.emailAddress" size="40" 
maxlength="128" value=""
id="productcommentssave_productComment_emailAddress"/></td>
36 </tr>
...

I get this xhtml-validation-message from w3c:

Line 27, Column 23: there is no attribute "errorFor"
<tr errorFor="productcommentssave_productComment_emailAddress">

You have used the attribute named above in your document, but the document type 
you are using
does not support that attribute for this element. This error is often caused by 
incorrect
use of the "Strict" document type with a document that uses frames (e.g. you 
must use the
"Transitional" document type to get the "target" attribute), or by using vendor 
proprietary
extensions such as "marginheight" (this is usually fixed by using CSS to 
achieve the desired
effect instead).
This error may also result if the element itself is not supported in the 
document type you
are using, as an undefined element will have no supported attributes; in this 
case, see the
element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember 
XHTML is all
lower-case) and/or check that they are both allowed in the chosen document 
type, and/or use
CSS instead of this attribute. If you received this error when using the 
<embed> element
to incorporate flash media in a Web page, see the FAQ item on valid flash.

What do you you think guys? The tr-tag does not look OK according to me, but I 
might be wrong?
What is this attribue "errorFor", how is it used by struts?
Do you guys see any solution to this?

Best regards
Fredrik                                           
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to