[JSTL] 페이징 게시판 순번 지정하기

int totalRecord = 0;  //전체 레코드 수
int numPerPage = 5; //블럭당 페이지 수
int pagePerBlock = 10;//기본값은 10 페이지블럭수
int beginPerPage = 0;  //페이지의 시작레코드번호

int nowPage=1; //현재 페이지번호

 

beginPerPage = (nowPage-1) * numPerPage;

pageContext.setAttribute("list",list);

pageContext.setAttribute("articleNum",new Integer(totalRecord-beginPerPage));

 

<c:forEach var="list" items="${list}" varStatus="status">

<c:out value="${articleNum-status.index}"/>

</c:forEach>

by matz | 2009/10/10 08:32 | 트랙백 | 덧글(0)

트랙백 주소 : http://matz.egloos.com/tb/1645825
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶