okinawa

IT勉強メモ

thymeleafで使えるページングのメソッド一覧

PageImplクラスのメソッドが使えるようです。

spring.pleiades.io

こんな感じでメソッド名そのままで使えるんです。 知らなかったなあ。 どういう仕組みなんだろ。

   <p th:text="${page.getSize}"></p>
    <p th:text="${page.getNumber}"></p>
    <p th:text="${page.NumberOfElements}"></p>
    <p th:text="${page.getContent}"></p>
    <p th:text="${page.hasContent}"></p>
    <p th:text="${page.isFirst}"></p>
    <p th:text="${page.nextOrLastPageable}"></p>
    <p th:text="${page.isLast()}"></p>
    <p th:text="${page.nextPageable}"></p>
    <p th:text="${page.getSort}"></p>
    <p th:text="${page.hasNext}"></p>
    <p th:text="${page.hasPrevious}"></p>
    <p th:text="${page.getTotalElements}"></p>
    <p th:text="${page.getTotalPages}"></p>
    <p th:text="${page.getPageable}"></p>
    <p th:text="${page.iterator}"></p>
    <p th:text="${page.empty}"></p>
    <p th:text="${page.totalPages}"></p>