Reputation: 8548
I would like to limit maximum pager item of p:dataTable or p:dataGrid. I think default is 10. I need to set it maximum of 5 pager item. Can it be possible ?
Below is my pagertemplate code.
<p:dataGrid styleClass="bodyContent"
var="item" value="#{list}"
paginatorPosition="bottom" paginator="true"
rows="5" lazy="true" columns="1" layout="grid"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,30,60"
rowIndexVar="index">
Upvotes: 1
Views: 1541
Reputation: 1131
You can use pageLinks
attribute to change this. In your case:
<p:dataGrid ... pageLinks="5">
Upvotes: 4