However, if you need an emptyMessage to be displayed later (e.g. when user-specific data is to be loaded), you could "disable" it upon first load using something like this:emptyMessage="#{dataBean.firstLoad ? '' : 'No records found.'}"其中 firstLoad 将是您的支持 bean 中的一个方法,它在用户刚刚登录时返回 true(例如要加载默认值),以及 false 否则,这意味着应该加载特定于用户的数据并且 实际上可能为空.where firstLoad would be a method in your backing bean which returns true when the user has just logged in (e.g. default values are to be loaded), and false when not, which would mean that user-specific data should be loaded and the <p:dataTable> could actually be empty. 这篇关于加载表内容时隐藏 Primefaces 数据表“未找到记录"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 02:38