You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/03/13 19:24:42 UTC

svn commit: r1577270 - in /ofbiz/branches/release13.07: ./ framework/widget/src/org/ofbiz/widget/form/ModelForm.java

Author: jleroux
Date: Thu Mar 13 18:24:41 2014
New Revision: 1577270

URL: http://svn.apache.org/r1577270
Log:
"Applied fix from trunk for revision: 1577268  " 
------------------------------------------------------------------------
r1577268 | jleroux | 2014-03-13 19:23:47 +0100 (jeu. 13 mars 2014) | 5 lignes

A patch from simon maskell for "Paginate in screen fails" https://issues.apache.org/jira/browse/OFBIZ-5574

When 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/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/form/ModelForm.java

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1577268

Modified: ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1577270&r1=1577269&r2=1577270&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Thu Mar 13 18:24:41 2014
@@ -2685,6 +2685,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);