Drawing table means JSF
The table includes only the headers. After rendering is still a empty tag TBODY
JSF:
<h:dataTable>
<h:column>
<f:facet name="header">
<h:outputText value="col1" />
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="col2" />
</f:facet>
</h:column>
</h:dataTable>
html result:
<table>
<thead>
<tr>
<th>
<span>col1</span>
</th>
<th>
<span>col2</span>
</th>
</tr>
</thead>
<tbody> </tbody>
</table>
How to write JSF code that would did not created an empty TBODY element
There is nothing wrong with your dataTable. The only things you defined were:
And that’s exactly what JSF rendered for you. You didn’t pass any data to the dataTable. You have to use the
valueattribute and pass a list.BalusC has an old article, but still usefull, about Using datatables.