Hide Empty Datatable PrimeFaces

谁说胖子不能爱 提交于 2019-12-11 18:07:48

问题


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


回答1:


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}"


来源:https://stackoverflow.com/questions/11864652/hide-empty-datatable-primefaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!