Hello guys! Thank's for all help about this validate error. I hope I did this correct and posted a issue at:
https://issues.apache.org/jira/browse/WW-4297 Btw I will soon post my second question in a new fresh thread. Best regards Fredrik ---------------------------------------- > From: fredan...@hotmail.com > To: user@struts.apache.org > Subject: RE: Why do I get this XHTML validation errors? (second attempt) > Date: Sun, 9 Mar 2014 20:56:20 +0000 > > Hello again guys! > > I might need to bother you about this presumptive bug also. > > I got struts-user-input-validations in the 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. > Of course that must be valid xhtml as well. The 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"? > > Btw I have never ever posted a bug about the first thing. If you need me to > do it I would love to help but how do I do it? Do I need some account to some > jira-server? > > Best regards > Fredrik > > ---------------------------------------- >> From: lukaszlen...@apache.org >> Date: Fri, 7 Mar 2014 22:04:13 +0100 >> Subject: Re: Why do I get this XHTML validation errors? (second attempt) >> To: user@struts.apache.org >> >> Yes, that would be the best solution. >> >> 2014-03-07 22:02 GMT+01:00 Paul Benedict <pbened...@apache.org>: >>> We need a JIRA ticket to solve this permanently. >>> >>> >>> On Fri, Mar 7, 2014 at 2:37 PM, Lukasz Lenart >>> <lukaszlen...@apache.org>wrote: >>> >>>> YooHoo! That's suppose to work template inheritance! >>>> >>>> 2014-03-07 21:03 GMT+01:00 Fredrik Andersson <fredan...@hotmail.com>: >>>>> Hello guys! >>>>> >>>>> I think you solved it! >>>>> >>>>> I put a new file "hidden.ftl" in my resources-folder (I use maven with >>>> eclipse): >>>>> resources/template/xhtml/hidden.ftl >>>>> >>>>> The content in hidden.ftl is: >>>>> >>>>> <tr style="display:none;"> >>>>> <td> >>>>> <#include "/${parameters.templateDir}/simple/hidden.ftl" >>>> /> >>>>> </td> >>>>> </tr> >>>>> >>>>> Now it validates fine! >>>>> >>>>> Best regards >>>>> Fredrik >>>>> >>>>> >>>>> >>>>> ---------------------------------------- >>>>>> From: thechrispr...@gmail.com >>>>>> Date: Thu, 6 Mar 2014 12:45:00 -0800 >>>>>> Subject: Re: Re: Why do I get this XHTML validation errors? (second >>>> attempt) >>>>>> To: user@struts.apache.org >>>>>> >>>>>> To elaborate on Dave's point, try: >>>>>> >>>>>> <tr style="display:none;"> >>>>>> <td> >>>>>> // both hidden fields >>>>>> </td> >>>>>> </tr> >>>>>> >>>>>> (*Chris*) >>>>>> >>>>>> >>>>>> On Thu, Mar 6, 2014 at 12:26 PM, Dave Newton <davelnew...@gmail.com> >>>> wrote: >>>>>> >>>>>>> On Thu, Mar 6, 2014 at 3:01 PM, Fredrik Andersson < >>>> fredan...@hotmail.com >>>>>>>>wrote: >>>>>>> >>>>>>>> I have tride to put the hidden attributet att: >>>>>>>> 1 first code line after the form-start-tag >>>>>>>> 2 before the submit-tag >>>>>>>> 3 after the submit-tag, before form-end-tag. >>>>>>>> None of the attempt validates. >>>>>>>> So If you guys got any idea how to solve this mystery plast let me >>>> know. >>>>>>>> >>>>>>> >>>>>>> You could try what I suggested until the hidden tags have xhtml >>>> templates >>>>>>> that emit correct HTML. >>>>>>> >>>>>>> Dave >>>>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>>>> For additional commands, e-mail: user-h...@struts.apache.org >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>>> For additional commands, e-mail: user-h...@struts.apache.org >>>> >>>> >>> >>> >>> -- >>> Cheers, >>> Paul >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org