zoukankan      html  css  js  c++  java
  • Thymeleaf分页

    网上找到的例子回来测试一下

    <div class="table-pagination">
        <ul class="pagination">
            <li th:class="${contactsPage.number eq 0} ? 'disabled' : ''">
                <a th:if="${not contactsPage.firstPage}" th:href="@{${'/contacts'}(page=${contactsPage.number-1},size=${contactsPage.size})}">Previous</a>
                <a th:if="${contactsPage.firstPage}" href="javascript:void(0);">Previous</a>
            </li>
    
            <li th:each="pageNo : ${#numbers.sequence(0, contactsPage.totalPages - 1)}" th:class="${contactsPage.number eq pageNo}? 'active' : ''">
                <a th:if="${contactsPage.number  eq pageNo}" href="javascript:void(0);">
                    <span th:text="${pageNo + 1}"></span>
                </a>
                <a th:if="${not (contactsPage.number  eq pageNo)}" th:href="@{${'/contacts'}(page=${pageNo},size=${contactsPage.size})}">
                    <span th:text="${pageNo + 1}"></span>
                </a>
    
            </li>
            <li th:class="${contactsPage.number + 1 ge contactsPage.totalPages} ? 'disabled' : ''">
                <a th:if="${not contactsPage.lastPage}" th:href="@{${'/contacts'}(page=${contactsPage.number+1},size=${contactsPage.size})}">Next</a>
                <a th:if="${contactsPage.lastPage}" href="javascript:void(0);">Next</a>
            </li>
        </ul>
    </div>
  • 相关阅读:
    HIVE的基本操作
    sqoop数据迁移
    工作流调度器azkaban
    C/s模式与B/S模式
    自动装箱和拆箱所带来的问题(1)“==”问题
    线程死锁
    模拟售票
    线程之间的通信
    线程同步引发的安全问题
    sql server 与 mysql在自定以数据类型的区别
  • 原文地址:https://www.cnblogs.com/hyl8218/p/5882071.html
Copyright © 2011-2022 走看看