Dynamic columns with List<List> in <p:dataTable><p:columns>

╄→гoц情女王★ 提交于 2019-12-01 08:20:16
BalusC

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!