The following example renders a list of the page numbers of the results pages that have been rendered so far. Each page number is a link to the corresponding results page, except for the current page number, which is displayed without a link. In addition, the example renders the word “more” as a link to the page following the current one.
<!-- Turn on fast paging -->
<dsp:input type="hidden" value="true"
bean="QueryFormHandler.searchRequest.fastPaging"/>
<!-- Indicate that the request should be saved in the search
session so that initial request data, such as the question
text, is available to subseqent paged requests. -->
<dsp:input bean="QueryFormHandler.searchRequest.saveRequest"
value="true" type="hidden"/>
<!-- Shortcut to the response object, which may be null -->
<c:set var="response" value="${formHandler.searchResponse}"/>
<!-- Display page numbers with links to take user to specified
page -->
<c:if test="${response != null}">
on page: ${1+response.pageNum}<br/>
Go to Page:
<c:forEach var="page" begin="1" end="${1+formHandler.pagesAvailable}">
<c:choose>
<c:when test="${page == (1+response.pageNum)}">
${page} <!-- current page -->
</c:when>
<c:otherwise>
<dsp:a href="fast-paging.jsp">
<c:choose>
<c:when test="${page == (1+formHandler.pagesAvailable) &&
response.multiPartitionSearch &&
formHandler.searchRequest.fastPaging}">
more
</c:when>
<c:otherwise>
${page}
</c:otherwise>
</c:choose>
<dsp:property bean="QueryFormHandler.searchRequest.requestChainToken"
value="${formHandler.searchResponse.requestChainToken}"/>
<dsp:property bean="QueryFormHandler.searchRequest.saveRequest"
value="true"/>
<dsp:property bean="QueryFormHandler.goToPage" value="${page}"/>
</dsp:a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:if>
