Code: Select all
<!DOCTYPE composition 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"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Java EE Test</title>
</h:head>
<h:body>
<p:dataTable value="#{testBean.rows}" var="row">
<p:subTable value="#{row}" var="row">
<p:columnGroup type="header">
<p:row>
<p:column headerText="My header" />
</p:row>
</p:columnGroup>
<p:column>
<h:outputText value="#{row}" />
</p:column>
<p:columnGroup type="footer">
<p:row>
<p:column footerText="My footer" />
</p:row>
</p:columnGroup>
</p:subTable>
</p:dataTable>
</h:body>
</html>
@ManagedBean
public class TestBean {
public List<String> getRows() {
return Arrays.asList("foo", "bar");
}
}
I added support for that myself to SubTableRenderer, it was pretty straightforward. Is there a chance my patch could be added to the official release? If so, I can create a new issue and post my patch there. Or maybe there is a simpler way to solve my problem?