<c:if test="${paging.pageCount > 1}">
<c:if test="${not empty searchkey}">
<c:set var="pagingpath1" value="&key=${searchkey}&value=${searchvalue}" />
</c:if>
<div style=" background:#f5f5f5; border:1px solid #dedede; height:30px; width:985px; margin:20px auto">
<div class="pagDiv_1"><a>Results:<span><c:out value="${ paging.page }"> - </c:out> - <c:out value="${ paging.pageCount }"></c:out> (total: <c:out value="${ paging.count }"></c:out>)</span></a></div>
<div class="page-nav">
<a>Pages:</a>
<c:choose>
<c:when test="${paging.orderStatus}">
<c:set var="pagingpath" value="&order=${paging.order}&dir=${paging.direction}">
</c:set>
</c:when>
<c:otherwise><c:set var="pagingpath" value=""></c:set></c:otherwise>
</c:choose>
<a class=lftarrow href="#">Previous ◄</a>
<c:forEach var="pid" varStatus="status" begin="1" end="${paging.pageCount}" step="1">
<c:choose>
<c:when test="${pid == paging.page}"><span class="cur-page"><b>${ pid }</b></span><label>|</label></c:when>
<c:otherwise><a class="page" href="consultant_list.htm?p=${pid}${pagingpath1}&selectiontype=${selectiontype1}&searchtext=${textbox1}">${ pid }</a><label>|</label></c:otherwise>
</c:choose>
</c:forEach>
<a class=lftarrow href="#">► Next</a>
</div>
</div>
</c:if>
連接的圖像具有在我的工作列表頁面。
代碼片段是在頁腳中顯示頁面。
如何讓一次只顯示4個頁碼並單擊「下一步」其他頁面必須可見?
只是一個提示:不這樣做,在JSP/JSTL/EL代碼。用Java編寫控制器中的視圖工作。關於代碼,只是爲當前版本的某些頁面生成鏈接,並且可能是第一個和最後一個鏈接的鏈接。整數算術。 – 2012-02-01 12:29:00
謝謝..我也在想同樣的事情。 – Meenakshi 2012-02-02 03:52:07