title: Paginated datatable doesn't show any records in next page
body: <p>I have a datatable with pagination: with <code>rows = 7</code> the first 7 items are correctly loaded and displayed; But when we click the links to see the next set of elements then "no record found" is displayed.</p>
  
  <p>For the table footer template, we have used </p>
  
  <pre><code>     In total there are #{fn:length(deviceBean.devices)} devices. 
  </code></pre>
  
  <p>which shows us (11 items found) that in all their are more items to be shown</p>
  
  <p>What am I doing wrong ?</p>
  
  <p>Here the xhtml file code:</p>
  
  <pre><code>    &lt;f:view xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"&gt;
  
      &lt;h:head /&gt;
  
  
      &lt;h:form&gt;
          &lt;p:growl id="messages"&gt;
              &lt;p:toolbarGroup align="right"&gt;
                  &lt;p:commandButton type="button" value="Summary" /&gt;
                  &lt;p:separator /&gt;
              &lt;/p:toolbarGroup&gt;
          &lt;/p:growl&gt;
      &lt;/h:form&gt;
  
      &lt;h:form&gt;
  
  
  
          &lt;p:dataTable id="tbl1" var="searchvalue"
              value="#{searchBean.searchmodel}" rows="1"&gt;
              &lt;p:column&gt;
  
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Search Criteria" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="By State Name" /&gt;
              &lt;/p:column&gt;
  
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Search Input" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{searchvalue.criteria}" /&gt;
              &lt;/p:column&gt;
  
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Selected Model" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{searchvalue.model}" /&gt;
              &lt;/p:column&gt;
  
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Start date" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{searchvalue.startdate}" /&gt;
              &lt;/p:column&gt;
  
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="End date" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{searchvalue.enddate}" /&gt;
              &lt;/p:column&gt;
              &lt;!-- &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Age Range" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{searchvalue.agerange}" /&gt;
              &lt;/p:column&gt; --&gt;
  
          &lt;/p:dataTable&gt;
      &lt;/h:form&gt;
  &lt;p:spacer width="100" height="10" /&gt; and &lt;p:spacer width="20" height="20" /&gt;
  &lt;h:outputText value="&amp;#160;" /&gt;
      &lt;h:form&gt;
  
          &lt;h:form&gt;
              &lt;p:growl id="messages"&gt;
                  &lt;p:toolbarGroup align="right"&gt;
                      &lt;p:commandButton type="button" value="Detail:" /&gt;
                      &lt;p:separator /&gt;
                  &lt;/p:toolbarGroup&gt;
              &lt;/p:growl&gt;
          &lt;/h:form&gt;
  
          &lt;p:dataTable id="tbl" var="device" value="#{deviceBean.devices}"
              paginator="true" rows="7"&gt;
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Name" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{device.name}" /&gt;
              &lt;/p:column&gt;
  
              &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Email" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{device.email}" /&gt;
              &lt;/p:column&gt;
  
  
              &lt;f:facet name="footer"&gt;  
              In total there are #{fn:length(deviceBean.devices)} devices.  
            &lt;/f:facet&gt;
  
          &lt;/p:dataTable&gt;
  
          &lt;br /&gt;
  
  
      &lt;/h:form&gt;
  
  &lt;/f:view&gt;
  </code></pre>
  
  <p>here is the managed bean class:</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class SearchBean implements Serializable {
  
      HttpServletRequest request = (HttpServletRequest) (FacesContext.getCurrentInstance().getExternalContext().getRequest());
      private List&lt;SearchModel&gt; searchmodel = (List) request.getAttribute("search_attributes");
  
      public List&lt;SearchModel&gt; getSearchmodel() {
          return searchmodel;
      }
  
  }
  </code></pre>
  
  <p>@BalusC :no i haven't used any thing beyond spring security, I am not managing beans by Spring, I can explain how it works :  After security authentication from Spring security the control comes to welcom.jsp page, in this page  I have used <code>&lt;jsp:forward page="/faces/index.xhtml"&gt;&lt;/jsp:forward</code> , which is my form , when form is submitted I call a class with form data in it , this class (Showsummary.java) does data query and puts data in key value pair like this req.setAttribute("search_attributes", searchattributes); , and then control comes to my managed bean again which returns "success" and this is mapped to the xhtml file which I have shown above in my faces-config, managed bean of summary.xhtml whose code i have written above access the data in this way :</p>
  
  <pre><code>HttpServletRequest request = (HttpServletRequest) (FacesContext.getCurrentInstance().getExternalContext().getRequest());
      private List&lt;SearchModel&gt; searchmodel = (List) request.getAttribute("search_attributes");
  
      public List&lt;SearchModel&gt; getSearchmodel() {
          return searchmodel;
      }
  </code></pre>