From 138502b03a79e2ab5f47f7fcb6cfa66fd2335a2e Mon Sep 17 00:00:00 2001 From: afterbase Date: Mon, 14 Sep 2015 01:04:13 +0800 Subject: [PATCH] =?UTF-8?q?org.springframework.data.domain.Page=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=B8=8D=E5=86=8D=E6=9C=89hasPreviousPage()=E5=92=8Ch?= =?UTF-8?q?asNextPage()=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/webapp/WEB-INF/tags/pagination.tag | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag b/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag index 4e3ad4eb9..85bb252d9 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag +++ b/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag @@ -1,48 +1,48 @@ -<%@tag pageEncoding="UTF-8"%> -<%@ attribute name="page" type="org.springframework.data.domain.Page" required="true"%> -<%@ attribute name="paginationSize" type="java.lang.Integer" required="true"%> - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - -<% -int current = page.getNumber() + 1; -int begin = Math.max(1, current - paginationSize/2); -int end = Math.min(begin + (paginationSize - 1), page.getTotalPages()); - -request.setAttribute("current", current); -request.setAttribute("begin", begin); -request.setAttribute("end", end); -%> - - - +<%@tag pageEncoding="UTF-8"%> +<%@ attribute name="page" type="org.springframework.data.domain.Page" required="true"%> +<%@ attribute name="paginationSize" type="java.lang.Integer" required="true"%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + +<% +int current = page.getNumber() + 1; +int begin = Math.max(1, current - paginationSize/2); +int end = Math.min(begin + (paginationSize - 1), page.getTotalPages()); + +request.setAttribute("current", current); +request.setAttribute("begin", begin); +request.setAttribute("end", end); +%> + + +