Reputation: 377
I am using Primefaces 5.1 and displaying total records in index.xhtml and it is perfectly working fine if I am NOT using paginator.
<h:body>
<div id="message">
<p>There are #{uBean.dataTable.rowCount} matching records.</p>
</div>
<h:form>
<p:tabView widgetVar="tabWidget" id="rTab" cellpadding="0px" cache="true">
When I start using paginator for my primefaces table, then I see the records are showing from the previous rendered count. Is there any way to refresh to display after load the page or delay to display this div or any other simple solutions. ----
Upvotes: 0
Views: 3270
Reputation: 12337
PrimeFaces loads/processes data for the datatable in the RenderResponse phase. This is very late in the jsf phases and that means that e.g. the rowcount or pagenumber is only available for components that are rendered after the datatable and that in turn means only for components that in the xhtml come after the datatable.
If you want to display things in a growl, this is usually not a problem since it displays at a 'absolute' location and you can put it after the datatable. But rendering it in a different kind of component and displaying it inline is not possible without a workaround.
For a workaround, you have two options
Upvotes: 1