From bc42869cd4600b67e0a8887be1f6d92b72ebf42e Mon Sep 17 00:00:00 2001 From: Calvin Date: Sat, 1 Sep 2012 18:45:21 +0800 Subject: [PATCH] =?UTF-8?q?#7=20Quickstart=20=E7=BB=88=E4=BA=8E=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=8E=92=E5=BA=8F=E5=92=8C=E5=88=86=E9=A1=B5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/webapp/WEB-INF/tags/pagination.tag | 18 +----------------- .../webapp/WEB-INF/views/task/taskList.jsp | 2 +- 2 files changed, 2 insertions(+), 18 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 ed501fc0..e6da2f1d 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag +++ b/examples/quickstart/src/main/webapp/WEB-INF/tags/pagination.tag @@ -6,24 +6,8 @@ <% int current = page.getNumber() + 1; - -int totalPages = page.getTotalPages(); int begin = Math.max(1, current - paginationSize/2); - -/* if ((current - paginationSize/2)<1){ - begin=1; -}else{ - //if(totalPages> (current +paginationSize/2 )) - begin =; - //else - //begin = current - paginationSize/2 +(totalPages-(current+paginationSize/2)); -//current =4 -// total=5 -// pageSize=4 -// /2=2 -} */ -int end = Math.min(begin + paginationSize - 1,totalPages); - +int end = Math.min(begin + paginationSize/2 - 1, page.getTotalPages()); request.setAttribute("current", current); request.setAttribute("begin", begin); diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskList.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskList.jsp index fa9c34ca..8c4549dd 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskList.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskList.jsp @@ -29,6 +29,6 @@ - 创建任务 +
创建任务