[
http://jira.jboss.com/jira/browse/RF-2977?page=all ]
Peter Haldbæk updated RF-2977:
------------------------------
Description:
According to the HTML 4.01 specification the CAPTION element is only permitted immediately
after the TABLE start tag. When using the rich:dataTable component together with the
f:facet caption component a COLGROUP tag is inserted before the CAPTION tag making the
html invalid.
Consider the following snippet:
<rich:dataTable id="list" var="region"
value="#{regions.regions}">
<f:facet name="caption">Regions</f:facet>
<rich:column>
<f:facet name="header">Value</f:facet>
<h:outputText value="#{region.value}" />
</rich:column>
<rich:column>
<f:facet name="header">Label</f:facet>
<h:outputText value="#{region.label}" />
</rich:column>
</rich:dataTable>
Where the parameter 'regions' is a seam component containing a method getRegions
returning a List of SelectItem (containing the methods getValue and getLabel).
This will result in HTML like this:
<table id="list" class="dr-table rich-table"
cellspacing="0" cellpadding="0" border="0">
<colgroup span="2"/>
<caption class="dr-table-caption
rich-table-caption">Regions</caption>
...
</table>
which is invalid HTML. I have seen this in earlier versions (pre 3.2.0) of RichFaces as
well.
was:
According to the HTML 4.01 specification the CAPTION element is only permitted immediately
after the TABLE start tag. When using the rich:dataTable component together with the
facet:caption component a COLGROUP tag is inserted before the CAPTION tag making the html
invalid.
Consider the following snippet:
<rich:dataTable id="list" var="region"
value="#{regions.regions}">
<f:facet name="caption">Regions</f:facet>
<rich:column>
<f:facet name="header">Value</f:facet>
<h:outputText value="#{region.value}" />
</rich:column>
<rich:column>
<f:facet name="header">Label</f:facet>
<h:outputText value="#{region.label}" />
</rich:column>
</rich:dataTable>
Where the parameter 'regions' is a seam component containing a method getRegions
returning a List of SelectItem (containing the methods getValue and getLabel).
This will result in HTML like this:
<table id="list" class="dr-table rich-table"
cellspacing="0" cellpadding="0" border="0">
<colgroup span="2"/>
<caption class="dr-table-caption
rich-table-caption">Regions</caption>
...
</table>
which is invalid HTML. I have seen this in earlier versions (pre 3.2.0) of RichFaces as
well.
Caption not rendered immediately after table element in
rich:dataTable
----------------------------------------------------------------------
Key: RF-2977
URL:
http://jira.jboss.com/jira/browse/RF-2977
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.0
Environment: OS: Windows XP
Platform: JBoss AS 4.2.1.GA, Sun JDK 1.6.0_02
Reporter: Peter Haldbæk
According to the HTML 4.01 specification the CAPTION element is only permitted
immediately after the TABLE start tag. When using the rich:dataTable component together
with the f:facet caption component a COLGROUP tag is inserted before the CAPTION tag
making the html invalid.
Consider the following snippet:
<rich:dataTable id="list" var="region"
value="#{regions.regions}">
<f:facet name="caption">Regions</f:facet>
<rich:column>
<f:facet name="header">Value</f:facet>
<h:outputText value="#{region.value}" />
</rich:column>
<rich:column>
<f:facet name="header">Label</f:facet>
<h:outputText value="#{region.label}" />
</rich:column>
</rich:dataTable>
Where the parameter 'regions' is a seam component containing a method getRegions
returning a List of SelectItem (containing the methods getValue and getLabel).
This will result in HTML like this:
<table id="list" class="dr-table rich-table"
cellspacing="0" cellpadding="0" border="0">
<colgroup span="2"/>
<caption class="dr-table-caption
rich-table-caption">Regions</caption>
...
</table>
which is invalid HTML. I have seen this in earlier versions (pre 3.2.0) of RichFaces as
well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira