title: Bug with primeFaces Pagination ; infinite number of pages
body: <p>I'm currently working on lookups Table for a JSF Project. 
  I have this table which will display a lot of codes later when linked to the database (for now it's hardcoded data) so I added primefaces 5.0 pagination. The problem here is that I have a Bug which happens when I created a Table for a specific code, change code , then go back to this table. <a href="https://i.stack.imgur.com/2vj2r.png" rel="nofollow noreferrer">Look what happens</a> : </p>
  
  <p><img src="https://i.stack.imgur.com/2vj2r.png" alt="enter image description here"></p>
  
  <p>An infinite number of pages with only 3 data... Every page are the same, and if I change the number of result per page, the problem disappear.</p>
  
  <p>Here is the table in the code :</p>
  
  <pre><code>&lt;h:form id="currentTable"&gt;
      &lt;p:growl id="msgs" showDetail="true"/&gt;
      &lt;p:dataTable widgetVar="dataTableWidgetVar" var="lookupRow"
                   value="#{lookupsView.currentLookup.lookupRows}" editable="true"
                   style="margin-bottom:20px"
                   styleClass="tableWrapText"
                   paginator="true"
                   paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                   rowsPerPageTemplate="10, 20, 30, 40, 50, 100, 200"
                   filteredValue="#{lookupsView.filteredLookupRows}"&gt;
  
          &lt;p:ajax event="rowEdit" update=":currentTable:msgs" listener="#{lookupsView.onRowEdit}"/&gt;
          &lt;p:ajax event="rowEditCancel" update=":currentTable:msgs"
                  listener="#{lookupsView.onRowCancel}"/&gt;
          &lt;p:column headerText="XBRL Code" filterBy="#{lookupRow.xbrlCodeMember.memberValue}"
                    footerText="contains" filterMatchMode="contains"&gt;
              &lt;h:outputText value="#{lookupRow.xbrlCodeMember.memberValue}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column headerText="Client Code " filterBy="#{lookupRow.clientCode}" footerText="contains"
                    filterMatchMode="contains"&gt;
              &lt;p:cellEditor&gt;
                  &lt;f:facet name="output"&gt; &lt;h:outputText value="#{lookupRow.clientCode}"/&gt;&lt;/f:facet&gt;
                  &lt;f:facet name="input"&gt;&lt;p:inputText value="#{lookupRow.clientCode}" style="width:100%"/&gt;&lt;/f:facet&gt;
              &lt;/p:cellEditor&gt;
          &lt;/p:column&gt;
          &lt;p:column headerText="XBRL Label" filterBy="#{lookupRow.xbrlCodeMember.memberDescription}"
                    footerText="contains" filterMatchMode="contains"&gt;
              &lt;h:outputText value="#{lookupRow.xbrlCodeMember.memberDescription}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column headerText="Client Label" filterBy="#{lookupRow.clientDescription}"
                    footerText="contains" filterMatchMode="contains"&gt;
              &lt;p:cellEditor&gt;
                  &lt;f:facet name="output"&gt;&lt;h:outputText value="#{lookupRow.clientDescription}"/&gt;&lt;/f:facet&gt;
                  &lt;f:facet name="input"&gt;&lt;p:inputText value="#{lookupRow.clientDescription}"
                                                     style="width:100%"/&gt;&lt;/f:facet&gt;
              &lt;/p:cellEditor&gt;
          &lt;/p:column&gt;
          &lt;p:column style="width:32px"&gt;
              &lt;p:rowEditor/&gt;
          &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Do you know where this bug could come from ?
  It's on a Jboss7 server.</p>