[web]pagenation 처리하는 방법
size -> 10개씩
page -> 현재 page index
int endPage = ((int)Math.ceil(page / (double)size)) * size;
int lastPage = ((int)Math.ceil(totalCount / (double)size));
int beginPage = endPage - (size - 1);
// 마지막에 10개 밑일 경우 처리
if (lastPage < endPage)
{
endPage = lastPage;
}
[참조 ]https://cbts.tistory.com/294
[JSP] 페이징(Paging) ① [11월28일]
(결과적으로 띄우고 싶은 화면!) 회원 리스트 밑에 페이지가 추가된 것을 볼 수 있음. 이번에 사용한 project의 모든 파일 일람표. 똑같은 내용에 프로젝트명만 L16Model2Paging으로 하면됩니다! 원래 ��
cbts.tistory.com
'web' 카테고리의 다른 글
[web]아임포트 본인인증서비스 화면 노출 시키는방법 (0) | 2021.02.15 |
---|---|
[web]locale 나라별 확인 가능한 사이트 (0) | 2020.11.30 |
[html]link show new window방법 (0) | 2020.09.16 |
[spring boot]security server not working aws 해결방법 (0) | 2020.09.14 |
[html]thymeleaf chart.js 적용 방법 (0) | 2020.08.21 |