I have several managed beans that lookup a list of database records and implement an Interface (SeamAction) with one method public void find() . In order to provide paging for the results I would like to have a template like this:
<s:link action="#{seamAction.find}" rendered="#{previousExists}"
value="||" id="firstPage">
<f:param name="firstResult" value="0" />
</s:link>
<s:link action="#{seamAction.find}" rendered="#{previousExists}"
id="previousPage">
<h:graphicImage id="previous" alt="previous" url="/images/arr-l.gif">
</h:graphicImage>
<f:param name="firstResult" value="#{previousFirstResult}" />
</s:link>
<s:link action="#{seamAction.find}" rendered="#{nextExists}"
id="nextPage">
<h:graphicImage id="next" alt="next" url="/images/arr-r.gif">
</h:graphicImage>
<f:param name="firstResult" value="#{nextFirstResult}" />
</s:link>
<s:link action="#{seamAction.find}" rendered="#{nextExists}" value="||"
id="lastPage">
<f:param name="firstResult" value="#{lastFirstResult}" />
</s:link>
<ui:include src="fragments/tableControl.jspx"rendered="#{resultList.rowCount gt 0}">
<ui:param name="seamAction" value="#{myAction}" />
</ui:include>