Author: jleroux
Date: Wed Mar 19 16:15:22 2014
New Revision: 1579277

URL: http://svn.apache.org/r1579277
Log:
A patch from Antoine Vittecoq for "Form widget/ FTL pagination, Last does not 
take to last page" https://issues.apache.org/jira/browse/OFBIZ-5575

This issue in pagination can be tested in 
https://localhost:8443/partymgr/control/findparty (FTL) & 
https://localhost:8443/webtools/control/FindUtilCache?VIEW_SIZE_1=2&VIEW_INDEX_1=0
 (XML Form).

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java?rev=1579277&r1=1579276&r2=1579277&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java Wed Mar 19 
16:15:22 2014
@@ -790,7 +790,7 @@ public class UtilMisc {
     }
 
     public static int getViewLastIndex(int listSize, int viewSize) {
-        return (int)Math.ceil(listSize / viewSize) - 1;
+        return (int)Math.ceil(listSize / (float) viewSize) - 1;
     }
     
 }


Reply via email to