[jboss-user] [JBoss Seam] - Write a custom pagination bar component ?
chicochen
do-not-reply at jboss.com
Fri Jun 29 01:12:22 EDT 2007
I like to Write a custom pagination bar component to replace the following codes.
Does it mean I will lose the benifit of "f:setPropertyActionListener" tag like below, and need to use parameters like "userQueryCriteria.gotoPage?curPage=#{pn}" ?
<h:commandLink value="#{pn}" action="#{userQueryCriteria.gotoPage}"
rendered="#{userQueryCriteria.curPage!=pn}">
<f:setPropertyActionListener
target="#{userQueryCriteria.curPage}" value="#{pn}" />
</h:commandLink>
=============================================
dataTable:
| <h:dataTable id="userList"
| value="#{userList}" var="user"
| styleClass="grid maxWidth" headerClass="colHeaderLink" rowClasses="rowAlternate rowNormal" >
| <h:column>
|
pagination bar:
| <h:commandLink value=" << " action="#{userQueryCriteria.firstPage}"
| rendered="#{userQueryCriteria.previousPageAvailable}" style="text-decoration:none" />
|
| <h:commandLink value=" < "
| action="#{userQueryCriteria.previousPage}"
| rendered="#{userQueryCriteria.previousPageAvailable}" style="text-decoration:none" />
|
| <c:forEach
| begin="1" end="#{userQueryCriteria.totalPage}" var="pn">
| <h:commandLink value="#{pn}" action="#{userQueryCriteria.gotoPage}"
| rendered="#{userQueryCriteria.curPage!=pn}">
| <f:setPropertyActionListener
| target="#{userQueryCriteria.curPage}" value="#{pn}" />
| </h:commandLink>
| <h:outputText value="#{pn}"
| rendered="#{userQueryCriteria.curPage==pn}" />
| </c:forEach>
|
| <h:commandLink value=" > "
| action="#{userQueryCriteria.nextPage}"
| rendered="#{userQueryCriteria.nextPageAvailable}" style="text-decoration:none"/>
|
| <h:commandLink value=" >> " action="#{userQueryCriteria.lastPage}"
| rendered="#{userQueryCriteria.nextPageAvailable}" style="text-decoration:none" />
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059006#4059006
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059006
More information about the jboss-user
mailing list