I know it's a bit obvious, but as you display default values anyway, you could set emptyMessage=""
in your <p:dataTable>
.
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.'}"
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…