Reputation: 1309
I have problem with h:datatable tag in JSF. I don't know, why my datatable is not showing on my page. Some advices?
Here is my code:
<h:dataTable rows="2" var="deb" value="#{debCredTab.rows}">
<h:column>
<f:facet name="header">
Debet
</f:facet>
<h:inputText value="#{deb.debet}" />
</h:column>
<h:column>
<f:facet name="header">
Credit
</f:facet>
<h:inputText value="#{deb.credit}" />
</h:column>
<h:column>
<f:facet name="header">
DebCredSum
</f:facet>
<h:inputText value="#{deb.debetCreditSum}" />
</h:column>
</h:dataTable>
And here is my output:
<table rules="all">
<tbody>
</tbody>
</table>
The question is: why? I forgot something? Why my table is not showing on the page?
Upvotes: 1
Views: 2227
Reputation: 108859
I would test to make sure your rows is not returning null:
<h:outputText value="#{debCredTab.rows eq null}" />
I would then check to see if the number of rows is zero.
Upvotes: 3