I've submitted an issue for this:
https://github.com/primefaces/primefaces/issues/2655
Code: Select all
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Primefaces example</title>
</h:head>
<h:form id="form">
<p:panelGrid>
<p:row>
<p:column headerText="column1" >
<h:outputText value="row1 col1" />
</p:column>
<p:column headerText="column2" >
<h:outputText value="row1 col2" />
</p:column>
</p:row>
<p:row>
<p:column>
<h:outputText value="row2 col1" />
<p:dataTable var="car" value="#{basicView.cars}">
<f:facet name="header">
<h:outputText value="Table within a panelgrid column" />
</f:facet>
<p:column headerText="Id">
<h:outputText value="#{car.id}" />
</p:column>
<p:column headerText="Year">
<h:outputText value="#{car.year}" />
</p:column>
<p:column headerText="Brand">
<h:outputText value="#{car.brand}" />
</p:column>
<p:column headerText="Color">
<h:outputText value="#{car.color}" />
</p:column>
</p:dataTable>
</p:column>
<p:column>
<h:outputText value="row 2 col2" />
</p:column>
</p:row>
</p:panelGrid>
<p:dataTable var="car" value="#{basicView.cars}">
<f:facet name="header">
<h:outputText value="Same table but not within a panelgrid column" />
</f:facet>
<p:column headerText="Id">
<h:outputText value="#{car.id}" />
</p:column>
<p:column headerText="Year">
<h:outputText value="#{car.year}" />
</p:column>
<p:column headerText="Brand">
<h:outputText value="#{car.brand}" />
</p:column>
<p:column headerText="Color">
<h:outputText value="#{car.color}" />
</p:column>
</p:dataTable>
</h:form>
</html>