/[Apache-SVN]
ViewVC logotype

Revision 1560176


Jump to revision: Previous Next
Author: jleroux
Date: Tue Jan 21 20:53:29 2014 UTC (10 years, 3 months ago)
Changed paths: 10
Log Message:
A patch from  Gareth Carter for "last index for paging is not calculated correctly" https://issues.apache.org/jira/browse/OFBIZ-5497

The last index (used on the last button) is not calculated correctly in ftl or the renderer classes. It currently users floor which works only for list sizes that are not multiples of the view size. When you have a list size which is a multiple of the view size, it does not subtract 1 for zero based index and therefore the last button goes to the last page + 1

Examples

listSize = 1
viewSize = 10
listSize / viewSize = 0.1
floor(0.1) = 0
This one produces the correct value

listSize = 20
viewSize = 10
listSize / viewSize = 2
floor(2) = 2
Last index should be 1 because of zero based index but never occurs

To reproduce, enter a view with a list and paging functionality, the list size must be a multiple of the view size


Changed paths

Path Details
Directoryofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/content/GetContentLookupList.groovy modified , text changed
Directoryofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl modified , text changed
Directoryofbiz/trunk/applications/party/webapp/partymgr/party/editShoppingList.ftl modified , text changed
Directoryofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl modified , text changed
Directoryofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java modified , text changed
Directoryofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy modified , text changed
Directoryofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java modified , text changed
Directoryofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java modified , text changed
Directoryofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java modified , text changed
Directoryofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26