I use datatable and I get the number of columns dynamically. I tried to repeat like this:
<h:dataTable value="#{movieUserBean.sits}" var="row"
rowClasses="oddRows,evenRows" headerClass="header"
styleClass="table" cellpadding="5" cellspacing="0">
<ui:repeat value="#{row}" var="sit">
<h:column>
<h:selectBooleanCheckbox value= "#{movieUserBean.checked[sit.id]}"/>
</h:column>
</ui:repeat>
Which syntax is a two-dimensional array, I thought the datatable should loop around the rows and loop around each value inside each row (this is an object called Sit with get method: getId).
The problem is that I get an empty table. It var "sit"doesn't seem to get the meaning. Could the problem be that the datatable ignores any elements that are not in the column area?
source
share