Author: lektran
Date: Thu Jun 12 22:27:55 2008
New Revision: 667358
URL:
http://svn.apache.org/viewvc?rev=667358&view=revLog:
Improvements to Han's fix
Modified:
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/FindProductConfigItems.groovy
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/FindProductConfigItems.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/FindProductConfigItems.groovy?rev=667358&r1=667357&r2=667358&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/FindProductConfigItems.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/FindProductConfigItems.groovy Thu Jun 12 22:27:55 2008
@@ -21,20 +21,11 @@
context.itemsList = itemsList;
// set the page parameters
-Integer viewIndex = 0;
-if (parameters.VIEW_INDEX) {
- viewIndex = new Integer(parameters.VIEW_INDEX);
-}
+viewIndex = parameters.VIEW_INDEX ?: 0;
-Integer viewSize = 20;
-if (parameters.VIEW_SIZE) {
- viewSize = new Integer(parameters.VIEW_SIZE);
-}
+viewSize = parameters.VIEW_SIZE ?: 20;
-listSize = 0;
-if (itemsList) {
- listSize = itemsList.size();
-}
+listSize = itemsList.size();
lowIndex = viewIndex * viewSize;
highIndex = (viewIndex + 1) * viewSize;