[richfaces-issues] [JBoss JIRA] Created: (RF-2977) Caption not rendered immediately after table element in rich:dataTable

Peter Haldbæk (JIRA) jira-events at lists.jboss.org
Fri Apr 4 08:41:34 EDT 2008


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 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

       




More information about the richfaces-issues mailing list