board/list.html ( 페이징 출력 ) > SPRING_DATA_JPA

본문 바로가기

사이트 내 전체검색

뒤로가기 SPRING_DATA_JPA

board/list.html ( 페이징 출력 )

페이지 정보

작성자 관리자 작성일 24-06-18 14:46 조회 149 댓글 0

본문

<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"

      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"

      layout:decorate="~{include/layout.html}">

<body>

<div layout:fragment="content">

<br>


<center>

<h1>LIST</h1>

<table width="700" border="0">

<tr>

<td>Total : [[${result.total}]]</td>

</tr>

</table>

<table width="700" border="1">

<tr>

<th width="50">No</th>

<th width="50">bno</th>

<th width="*">제목</th>

<th width="80">작성자</th>

<th width="80">날짜</th>

</tr>

<tr th:each="dto : ${result.dtoList}">

<td align="center">NO</td>

<td align="center">[[${dto.bno}]]</td>

<td>[[${dto.title}]]</td>

<td align="center">[[${dto.writer}]]</td>

<td align="center">[[${#temporals.format(dto.regDate, 'yyyy-MM-dd')}]]</td>

</tr>

</table>

<style>

.active { font-weight:bold; }

</style>

<table width="700" border="0">

<tr>

<td>

<span th:if="${result.prev}">

<a th:href="@{list(page=${result.start-1})}">이전</a></span>

</span>

<th:block th:each="i: ${#numbers.sequence(result.start, result.end)}">

<span th:class="${result.page == i ? 'active' : ''}">

<a th:href="@{list(page=${i})}" th:text="${i}"></a>

</span>

</th:block>

<span th:if="${result.next}">

<a th:href="@{list(page=${result.end+1})}">다음</a>

</span>

</td>

<td align="right">

<a href="list">[새로고침]</a>

<a href="register">[글쓰기]</a>

</td>

</tr>

</table>

</center>


<br>

</div>

</body>

</html>

댓글목록 0

등록된 댓글이 없습니다.


Copyright © dancePKT. All rights reserved.
PC 버전으로 보기