其实jsf分页真的好简单哦,下面将列举一下实现列子
第一步:
<t:dataTable id="fixs" value="#{action$fixing.data}"
var="fix" rows="6">
、、、
</t:dataTable>
值:action$fixing.data 绑定后台返回的 list集合,其中集合里放的是数据库中的所有记录。 rows 设定每分页的显示的行数。
第二步:
<t:dataScroller id="scroll_1" for="fixs" fastStep="10"
paginator="true" paginatorMaxPages="9" immediate="true"
actionListener="#{action$fixing.scrollerAction}">
<f:facet name="first">
<t:graphicImage url="../../images/arrow-first.gif" border="1" />
</f:facet>
<f:facet name="last">
<t:graphicImage url="../../images/arrow-last.gif" border="1" />
</f:facet>
<f:facet name="previous">
<t:graphicImage url="../../images/arrow-previous.gif" border="1"/>
</f:facet>
<f:facet name="next">
<t:graphicImage url="../../images/arrow-next.gif" border="1" />
</f:facet>
<f:facet name="fastforward">
<t:graphicImage url="../../images/arrow-ff.gif" border="1" />
</f:facet>
<f:facet name="fastrewind">
<t:graphicImage url="../../images/arrow-fr.gif" border="1" />
</f:facet>
</t:dataScroller>
第一步:
<t:dataTable id="fixs" value="#{action$fixing.data}"
var="fix" rows="6">
、、、
</t:dataTable>
值:action$fixing.data 绑定后台返回的 list集合,其中集合里放的是数据库中的所有记录。 rows 设定每分页的显示的行数。
第二步:
<t:dataScroller id="scroll_1" for="fixs" fastStep="10"
paginator="true" paginatorMaxPages="9" immediate="true"
actionListener="#{action$fixing.scrollerAction}">
<f:facet name="first">
<t:graphicImage url="../../images/arrow-first.gif" border="1" />
</f:facet>
<f:facet name="last">
<t:graphicImage url="../../images/arrow-last.gif" border="1" />
</f:facet>
<f:facet name="previous">
<t:graphicImage url="../../images/arrow-previous.gif" border="1"/>
</f:facet>
<f:facet name="next">
<t:graphicImage url="../../images/arrow-next.gif" border="1" />
</f:facet>
<f:facet name="fastforward">
<t:graphicImage url="../../images/arrow-ff.gif" border="1" />
</f:facet>
<f:facet name="fastrewind">
<t:graphicImage url="../../images/arrow-fr.gif" border="1" />
</f:facet>
</t:dataScroller>