隐藏空数据表PrimeFaces [英] Hide Empty Datatable PrimeFaces

查看:250
本文介绍了隐藏空数据表PrimeFaces的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Primefaces在glassfish 3.1上工作。如果她是空的,我需要隐藏一个dataTable来显示错误信息。

I work on glassfish 3.1 with Primefaces. And i need to hide a dataTable if she is empty for display a error message.

但是我无法在视图中隐藏DataTable。

But i can't hide a DataTable in the view.

任何人都可以给我一个例子来帮助我吗?

Anyone can give me an exemple for help me ?

谢谢

推荐答案

您可以使用样式属性:

style="display:block;"

style= "display:none";

找不到数据时。

你也可以使用renderen属性:

You can also use renderen attribute:

<p:dataTable rendered="#{bean.dataFound}"

这篇关于隐藏空数据表PrimeFaces的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆