Author: jleroux
Date: Thu Mar 13 18:23:47 2014
New Revision: 1577268
URL:
http://svn.apache.org/r1577268Log:
A patch from simon maskell for "Paginate in screen fails"
https://issues.apache.org/jira/browse/OFBIZ-5574When you use the paginate = true in a screen and the total number of rows returned is greater than 999 the string is formatted with a coma and an exception is thrown when trying to convert it to an Integer.
jleroux: this depends on language (French would be space) but Simon's fix works for all (we are only dealing with integers there)
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1577268&r1=1577267&r2=1577268&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Thu Mar 13 18:23:47 2014
@@ -2688,6 +2688,7 @@ public class ModelForm extends ModelWidg
String size = this.overrideListSize.expandString(context);
if (UtilValidate.isNotEmpty(size)) {
try {
+ size =size.replaceAll("[^0-9.]", "");
listSize = Integer.parseInt(size);
} catch (NumberFormatException e) {
Debug.logError(e, "Error getting override list size from value " + size, module);