Displaying a “No records found” message for an empty JSF HtmlDataTable September 23, 2007
Posted by essamabdelaziz in JSF.trackback
you want to display a “No records found” message when you have an empty HtmlDataTable in JSF
<h:dataTable var="row" value="#{mybean.rows}" rendered="#{mybean.rows.rowCount > 0}">
<h:column><f:facet name="header"><h:outputText value="row title 1" /></f:facet><h:outputText value="#{row.firstColumn}" /></h:column><h:column><f:facet name="header"><h:outputText value="row title 2" /></f:facet><h:outputText value="#{row.secondColumn}" /></h:column><h:column><f:facet name="header"><h:outputText value="row title 3" /></f:facet><h:outputText value="#{row.thirdColumn}" /></h:column></h:dataTable><h:outputText value="No records found" rendered="#{mybean.rows.rowCount == 0}" />
Comments»
No comments yet — be the first.