You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/09/07 13:19:58 UTC
svn commit: r812085 - in /ofbiz/trunk/applications/order:
webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy
widget/ordermgr/OrderEntryForms.xml
Author: lektran
Date: Mon Sep 7 11:19:58 2009
New Revision: 812085
URL: http://svn.apache.org/viewvc?rev=812085&view=rev
Log:
Fix some issues I caused with the purchase order Bulk Add Supplier Product screen
Two things I didn't realize:
1. for VIEW_INDEX_x parameters, x is 1 based rather than 0 based
2. when override-list-size is used in the form widget it expects the list to be a window of the result set
and not a size limited list
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy
ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy?rev=812085&r1=812084&r2=812085&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.groovy Mon Sep 7 11:19:58 2009
@@ -28,12 +28,12 @@
// so we'll take a best effort approach to limit the size of the results
maxRows = null;
// TODO: Find a way to get the pagination parameters for a given form
-if (!parameters.containsKey("VIEW_INDEX_1")) {
+if (!parameters.containsKey("VIEW_INDEX_2")) {
// There's only one set of pagination parameters so it must be for us
- if (parameters.VIEW_SIZE_0) {
- if (parameters.VIEW_INDEX_0) {
- viewSize = Integer.valueOf(parameters.VIEW_SIZE_0);
- viewIndex = Integer.valueOf(parameters.VIEW_INDEX_0);
+ if (parameters.VIEW_SIZE_1) {
+ if (parameters.VIEW_INDEX_1) {
+ viewSize = Integer.valueOf(parameters.VIEW_SIZE_1);
+ viewIndex = Integer.valueOf(parameters.VIEW_INDEX_1);
maxRows = viewSize * (viewIndex + 1);
}
}
@@ -81,7 +81,6 @@
supplierProducts = delegator.findList("SupplierProduct", conditions, selectedFields, ["productId"], null, false);
newProductList = [];
-skippedResults = 0;
for (supplierProduct in supplierProducts) {
productId = supplierProduct.productId;
@@ -93,7 +92,7 @@
}
if (newProductList.size() >= maxRows) {
// We've got enough results to display, keep going to get the result size but skip the heavy stuff
- skippedResults += productFacilityList.size();
+ newProductList.add(null);
} else {
quantityOnOrder = 0.0;
// find approved purchase orders
@@ -136,5 +135,5 @@
}
}
}
-context.productListSize = newProductList.size() + skippedResults;
+context.productListSize = newProductList.size();
context.productList = newProductList;
\ No newline at end of file
Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml?rev=812085&r1=812084&r2=812085&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml Mon Sep 7 11:19:58 2009
@@ -172,8 +172,7 @@
</field>
</form>
<form name="LookupBulkAddSupplierProducts" type="multi" use-row-submit="true" list-name="productList" title="" target="BulkAddProducts"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="LookupBulkAddSupplierProducts"
- override-list-size="${productListSize}">
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="LookupBulkAddSupplierProducts" view-size="5">
<field name="productId" widget-style="buttontext">
<hyperlink description="${productId}" target="/catalog/control/EditProductInventoryItems" target-type="inter-app">
<parameter param-name="productId"/>