svn commit: r1040091 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1040091 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy

ashish-18
Author: ashish
Date: Mon Nov 29 12:46:58 2010
New Revision: 1040091

URL: http://svn.apache.org/viewvc?rev=1040091&view=rev
Log:
Bug fix.
Removed hard coded viewSize value from FindGeneric.groovy file. If viewSize is not available in parameters then read defaultViewSize from widget.properties and set it as a viewSize. Hard coded view size create inconsistency in pagination. i.e If result contains 15 items then view size displayed in dropdown is 20 and only (1 - 10 of 15 ) items displayed as a search result.

Thanks Deepak & Rishi for the contribution.

Modified:
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy?rev=1040091&r1=1040090&r2=1040091&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy Mon Nov 29 12:46:58 2010
@@ -28,6 +28,7 @@ import org.ofbiz.entity.model.ModelField
 import org.ofbiz.entity.model.ModelFieldType;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.base.util.UtilFormatOut;
+import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
@@ -122,7 +123,7 @@ context.viewIndexNext = viewIndex+1;
 try {
     viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue();
 } catch (NumberFormatException nfe) {
-    viewSize = 10;
+    viewSize = Integer.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.form.defaultViewSize")).intValue();
 }
 
 context.viewSize = viewSize;