728x90

 

현재 페이지가 보이는 않는 번호 때문에

<c:if test="${ pn ne pi.currentPage }"> 조건을 추가한 코드가 추가 됐는데

음.. 알 듯 말 듯

현재페이지번호랑 시작 끝 번호로 만들어지는 인덱스번호랑 연관 관계가 아직 잘 몰르겠다

왜 같이 않으면 조건인지

 

<!-- 페이징 처리 -->
<tr align="center" height="20" id="buttonTab">
<td colspan="6">
    <!-- [이전] -->
    <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="pn" begin="${pi.startPage }" end="${ pi.endPage }">
        <c:if test="${ pn eq pi.currentPage }">
            <font color="red" size="4"><b>[${ pn }]</b></font>
        </c:if>

        <c:if test="${ pn ne pi.currentPage }">
            <c:url var="paging" value="blist.bo">
                <c:param name="page" value="${ pn }"></c:param>
            </c:url>
            <a href="${ paging }">${ pn }</a>&nbsp;
        </c:if>
    </c:forEach>

 

728x90
반응형

+ Recent posts