[jboss-user] [JBoss Seam] - BUG - EntityQuery paging requires client-side state saving?

ASavitsky do-not-reply at jboss.com
Mon Apr 23 10:40:33 EDT 2007


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



More information about the jboss-user mailing list