I'm developing a data-centric Web Application using JSF 2.1 and PrimeFaces 3.4.
As a result of a specific query, I must display the results in a bi-dimensional data table with some dynamic columns (imagine a sort of Pivot-table).
Currently I use a PrimeFaces <p:dataTable>
with some standard <p:column>
tags and a <p:columns>
for the dynamically-created columns. The table is backed by a @ViewScoped
Managed Bean.
It works fine, but:
- Just like a pivot-table, I need to display multiple headers too, in
order to group some fields together. Unfortunately,
<p:columns>
is not compatible with<p:columnGroup>
(nor with many other features like resizing etc.) - I need to display some custom sub-total rows (is there a way to do this?)
I was thinking about populating the entire <p:dataTable>
programmatically, but I can't use binding="#{...}"
with a @ViewScoped
bean due to JSF issue 1492.