[cvs]
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc
RecordPaginator.java
JCorporate Ltd
jcorp at jcorp2.servlets.net
Wed May 12 00:21:14 PDT 2004
Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc
In directory jcorp2.servlets.net:/tmp/cvs-serv5298/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc
Modified Files:
RecordPaginator.java
Log Message:
fix multdbobject support for pagelimit, and fix pagecount-- from Matteo
Index: RecordPaginator.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** RecordPaginator.java 3 Aug 2003 10:26:26 -0000 1.11
--- RecordPaginator.java 12 May 2004 07:21:12 -0000 1.12
***************
*** 68,76 ****
private int totalRecordCount;
- /**
- * Total number of pages available
- */
- private int totalPageCount;
-
public RecordPaginator() {
}
--- 68,71 ----
***************
*** 182,187 ****
return 1;
} else {
! return (int)(this.getTotalRecordCount() / pageLimit) + 1;
! }
}
--- 177,187 ----
return 1;
} else {
! int pageCount = (int) (this.getTotalRecordCount() / pageLimit);
! int mod = (int) (this.getTotalRecordCount() % pageLimit);
! if (mod != 0 || pageCount == 0) {
! pageCount++;
! }
! return pageCount;
! }
}
***************
*** 271,276 ****
pageLimitObj = (Integer) searchCriteria.getAttribute("pageLimit");
}
-
- int pageLimit;
if (pageLimitObj != null) {
--- 271,274 ----
More information about the cvs
mailing list