I haven't found any mentions on that in Seam docs, but it seems that the 
example code in 10.3 ("Query Objects") that shows pagination support for 
EntityQuery, only works when javax.faces.STATE_SAVING_METHOD is "client". When 
the state is saved on the server, the application always shows the first page. 
Is this the way it was intended to work, or is this a bug?

components.xml:
<fwk:entity-query name="auditRecords" ejbql="FROM AuditInfo"
  |             order="createdOn DESC" max-results="10" />

auditLog.xhtml:
        <h:dataTable id="table" var="auditRecord" 
value="#{auditRecords.resultList}">
  |             <f:facet name="footer">
  |                     <h:panelGrid columns="4">
  |                             <s:link value="First">
  |                                     <f:param name="start" value="0" />
  |                             </s:link>
  |                             <s:link value="Prev">
  |                                     <f:param name="start" 
value="#{auditRecords.previousFirstResult}" />
  |                             </s:link>
  |                             <s:link value="Next">
  |                                     <f:param name="start" 
value="#{auditRecords.nextFirstResult}" />
  |                             </s:link>
  |                             <s:link value="Last>
  |                                     <f:param name="start" 
value="#{auditRecords.lastFirstResult}" />
  |                             </s:link>
  |                     </h:panelGrid>
  |             </f:facet>
  |             <h:column>
  |                     <f:facet name="header">
  |                             <h:outputText value="Id" />
  |                     </f:facet>
  |                     <h:outputText value="#{auditRecord.id}" />
  |             </h:column>
  |             <h:column>
  |                     <f:facet name="header">
  |                             <h:outputText value="Date" />
  |                     </f:facet>
  |                     <h:outputText value="#{auditRecord.createdOn}" />
  |             </h:column>
  |             <h:column>
  |                     <f:facet name="header">
  |                             <h:outputText value="User" />
  |                     </f:facet>
  |                     <h:outputText value="#{auditRecord.createdBy}" />
  |             </h:column>
  |     </h:dataTable>
  | 

pages.xml:
        <page view-id="/auditLog.xhtml">
  |             <param name="start" value="#{auditRecords.firstResult}" />
  |     </page>
  | 

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039865#4039865

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039865
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to