Reputation: 1846
I work on glassfish 3.1 with Primefaces. And i need to hide a dataTable if she is empty for display a error message.
But i can't hide a DataTable in the view.
Anyone can give me an exemple for help me ?
Thanks
Upvotes: 0
Views: 5748
Reputation: 716
You can use style attribute:
style="display:block;"
when data found or:
style= "display:none";
when data not found.
You can also use renderen attribute:
<p:dataTable rendered="#{bean.dataFound}"
Upvotes: 3