728x90

 

페이징처리 뷰단 코드 써보기

손코딩

 

<!-- 페이징처리 tr -->
		<tr align="center" height="20" id="buttonTab">
			<td colspan="6">
				<!-- prev -->
				<c:if test="${ pi.currentPage <= 1 }">
					[이전] &nbsp;
				</c:if>
				<c:if test="${ pi.currentPage > 1 }">
					<c:url var="before" value="blist.bo">
						<c:param name="page" value="${ pi.currentPage - 1 }"/>
					</c:url>
					<a href="${ before }">[이전]</a>&nbsp;
				</c:if>
			
				<!-- 페이지번호 -->
				<c:forEach var="p" begin="${pi.startPage }" end="${pi.endPage }">
					<c:if test="${ p == pi.currentPage }">
						<font color="red" size="4"><b>[${p}]</b></font>
					</c:if>
					
					<c:if test="${ p ne pi.currentPage }">
						<c:url var="pagination" value="blist.bo">
							<c:param name="page" value="${ p }"/>
						</c:url>
					</c:if>
					<a href="${ pagination }">${p}</a> &nbsp;
				</c:forEach>
				<!-- next -->
				<c:if test="${pi.currentPage >= maxPage }">
					[다음]
				</c:if>
				<c:if test="${pi.currentPage < pi.maxPage }">
					<c:url var="after" value="blist.bo">
						<c:param name="page" value="${pi.currentPage + 1 }"/>
					</c:url>
					<a href="${ after }">[다음]</a>
				</c:if>
			</td>
		</tr>
728x90
반응형

+ Recent posts