[
https://issues.apache.org/jira/browse/MYFACES-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059981#comment-13059981
]
Robert M. Gary commented on MYFACES-3204:
-----------------------------------------
Martin,
The example I gave above is a bit artificial. I'm seeing this bug in our
released product. However, I tried to remove as much of the markup as possible
in order to keep the example small. So this is a much smaller version of what I
have. In our product the div tag was unnecessary so I've removed it (lots of
people wrote JSF code here without understanding it). At this point this is not
holding me up but I did want to report it as it may appear in other
manifestations.
-Robert
> h:panelGrid sometimes renders invalid html
> ------------------------------------------
>
> Key: MYFACES-3204
> URL: https://issues.apache.org/jira/browse/MYFACES-3204
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.7
> Environment: JBoss AS 6, Windows Server 2008 R2
> Reporter: Robert M. Gary
>
> If you use the following xhtml tags...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!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" xml:lang="en" lang="en"
> xmlns:h="http://java.sun.com/jsf/html">
> <body>
> <h:form>
> <h:panelGrid>
> <div id="presetRanges">
> <h:panelGrid columns="1" rendered="false">
> <!--<h:outputText value="bar"/>-->
> </h:panelGrid>
> </div>
> </h:panelGrid>
> </h:form>
> </body>
> </html>
>
> It renders as...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!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" xml:lang="en" lang="en">
> <body>
> <form id="j_id1140648439_43fce9ed" name="j_id1140648439_43fce9ed"
> method="post"
> action="/testJSF2Web/testPage2.jsf"
> enctype="application/x-www-form-urlencoded">
> <table>
> <tbody>
> <tr>
> <td>
> <div id="presetRanges">
> </td>
> </tr>
> <tr>
> <td>
> </div>
> </td>
> </tr>
> </tbody>
> </table>
> <input type="hidden" name="j_id1140648439_43fce9ed_SUBMIT" value="1"/>
> <input type="hidden" name="javax.faces.ViewState"
> id="javax.faces.ViewState"
>
> value="q6SajcUugOiXkLYISx+QCHdiiJQJaJ0Jp3CJQ1RG4fxGBST1c3AxMgaZV3YCFzI9Zw0w96iHAnAMsgzyz8pgbdtPf62LeHqDS/XPyF4aZcRgRL6/wBvcghc1G/wLNvr2cnNRNw=="/>
> </form>
> <div id="javax_faces_developmentstage_messages"></div>
> </body>
> </html>
>
> Notice that the <div> tag's closing is placed in the incorrect location in
> the table, resulting in invalid HTML.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira