jsf - After filtering datatable, pagination is not rendered anymore in primefaces -


i have created datatable using primefaces. contains options filtering, sorting , pagination. before filtering table, pagination works correctly. when data filtered, pagination doesn't work. means page numbers not rendered. before have created datatable in application in same way. works correctly. tried lazydatamodel of primefaces in code also. didn't work. can't figure out error in code.

<ui:composition xmlns="http://www.w3.org/1999/xhtml"             xmlns:ui="http://java.sun.com/jsf/facelets"             xmlns:h="http://java.sun.com/jsf/html"             xmlns:p="http://primefaces.org/ui"             xmlns:f="http://java.sun.com/jsf/core"             template="home.xhtml"> <ui:define name="content">     <p:tabview style="font-size: 12px" id="numberanalyzertab">         <p:tab title="number analyzer">             <h:form id="form">                 <p:messages id="msgs" showdetail="true" autoupdate="true" closable="true"/>                 <p:datatable id="datatable"                              var="addressevent"                              value="#{addresstablebean.addressunits}"                              rowkey="#{addressevent.id}"                              rows="10"                              selectionmode="single"                              paginator="true" filteredvalue="#{addresstablebean.filteredaddressunits}"                              editable="true">                      <f:facet name="header">                         <h:outputtext value="list of addresses"/>                     </f:facet>                      <p:column headertext="prefix" sortby="#{addressevent.numberprefix}" filterby="#{addressevent.numberprefix}" id="prifix">                          #{addressevent.numberprefix}                     </p:column>                  </p:datatable>             </h:form>         </p:tab>     </p:tabview> </ui:define> 

try adding paginatortemplate p:datatable , make sure not modify

addresstablebean.filteredaddressunits  

in bean, not using new operator

paginatortemplate="{currentpagereport}  {firstpagelink} {previouspagelink} {pagelinks} {nextpagelink} {lastpagelink} {rowsperpagedropdown}"  rowsperpagetemplate="20,50,100" //your values here 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -