Code: Select all
<p:dataTable var="row" value="#{tableBean.rows}">
<p:column headerText="Title">
<h:outputText value="#{row.title}" />
</p:column>
<p:columns value="#{tableBean.columns}" var="col" columnIndexVar="index" id="col#{index}">
<f:facet name="header">
<h:outputLabel value="#{col.category}"/>
</f:facet>
<p:selectBooleanCheckbox value="#{row.options[index]}"/>
</p:columns>
</p:dataTable>
Code: Select all
public class TableBean {
private List<TableRow> rows;
private List<TableClolumn> columns;
...
}
Code: Select all
public class TableRow {
private List<Boolean> options;
private String title;
...
}
Is it a bug?