I\'m attempting to generate a dataTable
with columns dinamycally, so I\'ve a List
when a List
inside of a List
The <p:columns value>
cannot refer the <p:dataTable var>
. It is technically and logically not possible to control the columns on a per-row basis. They have to be controlled on a per-table basis.
If your model guarantees that every nested list has the same size, then this should do:
<p:dataTable value="#{controlador.estadistico}" var="lista">
<p:columns value="#{controlador.estadistico[0]}" columnIndexVar="i">
#{lista[i]}
</p:columns>
</p:dataTable>
See also the <p:columns> showcase.