Author: jonesde
Date: Mon Feb 12 10:50:26 2007 New Revision: 506575 URL: http://svn.apache.org/viewvc?view=rev&rev=506575 Log: Changed requestParameters to parameters in a bunch of places, as that is the one that should nearly always be usedfor consistency, and to support the request to session etc defaulting pattern; also removed a number of statements to manually create the Map instead of using the one always created by the Screen Widget Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editcontactmech.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/category.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/quickadd.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editcontactmech.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editcontactmech.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editcontactmech.bsh (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/editcontactmech.bsh Mon Feb 12 10:50:26 2007 @@ -67,25 +67,24 @@ } tryEntity = context.get("tryEntity"); -requestParameters = UtilHttp.getParameterMap(request); contactMechData = context.get("contactMech"); -if (!tryEntity.booleanValue()) contactMechData = requestParameters; +if (!tryEntity.booleanValue()) contactMechData = parameters; if (contactMechData == null) contactMechData = new HashMap(); if (contactMechData != null) context.put("contactMechData", contactMechData); partyContactMechData = context.get("partyContactMech"); -if (!tryEntity.booleanValue()) partyContactMechData = requestParameters; +if (!tryEntity.booleanValue()) partyContactMechData = parameters; if (partyContactMechData == null) partyContactMechData = new HashMap(); if (partyContactMechData != null) context.put("partyContactMechData", partyContactMechData); postalAddressData = context.get("postalAddress"); -if (!tryEntity.booleanValue()) postalAddressData = requestParameters; +if (!tryEntity.booleanValue()) postalAddressData = parameters; if (postalAddressData == null) postalAddressData = new HashMap(); if (postalAddressData != null) context.put("postalAddressData", postalAddressData); telecomNumberData = context.get("telecomNumber"); -if (!tryEntity.booleanValue()) telecomNumberData = requestParameters; +if (!tryEntity.booleanValue()) telecomNumberData = parameters; if (telecomNumberData == null) telecomNumberData = new HashMap(); if (telecomNumberData != null) context.put("telecomNumberData", telecomNumberData); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/category.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/category.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/category.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/category.bsh Mon Feb 12 10:50:26 2007 @@ -29,10 +29,9 @@ detailScreen = "categorydetail"; catalogName = CatalogWorker.getCatalogName(request); delegator = request.getAttribute("delegator"); -requestParameters = UtilHttp.getParameterMap(request); productCategoryId = request.getAttribute("productCategoryId"); if (productCategoryId == null) { - productCategoryId = requestParameters.get("category_id"); + productCategoryId = parameters.get("category_id"); } context.put("productCategoryId", productCategoryId); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh Mon Feb 12 10:50:26 2007 @@ -28,8 +28,8 @@ import org.ofbiz.product.catalog.*; import org.ofbiz.product.category.CategoryContentWrapper; -viewSize = requestParameters.get("VIEW_SIZE"); -viewIndex = requestParameters.get("VIEW_INDEX"); +viewSize = parameters.get("VIEW_SIZE"); +viewIndex = parameters.get("VIEW_INDEX"); currentCatalogId = CatalogWorker.getCurrentCatalogId(request); // set the default view size Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/quickadd.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/quickadd.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/quickadd.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/quickadd.bsh Mon Feb 12 10:50:26 2007 @@ -30,9 +30,8 @@ import org.ofbiz.product.catalog.*; dispatcher = request.getAttribute("dispatcher"); -requestParameters = UtilHttp.getParameterMap(request); currentCatalogId = CatalogWorker.getCurrentCatalogId(request); -categoryId = requestParameters.get("category_id"); +categoryId = parameters.get("category_id"); if (categoryId == null || categoryId.length() <= 0) categoryId = CatalogWorker.getCatalogQuickaddCategoryPrimary(request); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh Mon Feb 12 10:50:26 2007 @@ -27,10 +27,8 @@ import org.ofbiz.product.category.*; import javolution.util.FastMap; -requestParameters = UtilHttp.getParameterMap(request); - CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, CatalogWorker.getCurrentCatalogId(request)), true); -curCategoryId = UtilFormatOut.checkNull(requestParameters.get("category_id"), requestParameters.get("CATEGORY_ID")); +curCategoryId = UtilFormatOut.checkNull(parameters.get("category_id"), parameters.get("CATEGORY_ID")); request.setAttribute("curCategoryId", curCategoryId); CategoryWorker.setTrail(request, curCategoryId); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh Mon Feb 12 10:50:26 2007 @@ -387,7 +387,7 @@ productStore = ProductStoreWorker.getProductStore(request); List filterInventoryProblems = new ArrayList(); - if ("Y".equals(requestParameters.get("filterInventoryProblems")) && UtilValidate.isNotEmpty(orderHeaderList)) { + if ("Y".equals(parameters.get("filterInventoryProblems")) && UtilValidate.isNotEmpty(orderHeaderList)) { paramList = paramList + "&filterInventoryProblems=" + "Y"; for (ohi = orderHeaderList.iterator(); ohi.hasNext();) { orderHeader = (GenericValue) ohi.next(); @@ -403,19 +403,19 @@ List filterPOsWithRejectedItems = new ArrayList(); List filterPartiallyReceivedPOs = new ArrayList(); - if ("Y".equals(requestParameters.get("filterPOsWithRejectedItems"))) { + if ("Y".equals(parameters.get("filterPOsWithRejectedItems"))) { paramList = paramList + "&filterPOsWithRejectedItems=" + "Y"; } - if ("Y".equals(requestParameters.get("filterPOsOpenPastTheirETA"))) { + if ("Y".equals(parameters.get("filterPOsOpenPastTheirETA"))) { paramList = paramList + "&filterPOsOpenPastTheirETA=" + "Y"; } - if ("Y".equals(requestParameters.get("filterPartiallyReceivedPOs"))) { + if ("Y".equals(parameters.get("filterPartiallyReceivedPOs"))) { paramList = paramList + "&filterPartiallyReceivedPOs=" + "Y"; } - if (("Y".equals(requestParameters.get("filterPartiallyReceivedPOs")) || - "Y".equals(requestParameters.get("filterPOsOpenPastTheirETA")) || - "Y".equals(requestParameters.get("filterPOsWithRejectedItems"))) && + if (("Y".equals(parameters.get("filterPartiallyReceivedPOs")) || + "Y".equals(parameters.get("filterPOsOpenPastTheirETA")) || + "Y".equals(parameters.get("filterPOsWithRejectedItems"))) && UtilValidate.isNotEmpty(orderHeaderList)) { for (ohi = orderHeaderList.iterator(); ohi.hasNext();) { orderHeader = (GenericValue) ohi.next(); @@ -426,18 +426,18 @@ orderReadHelper = OrderReadHelper.getHelper(orderHeader); if ("PURCHASE_ORDER".equals(orderHeader.getString("orderTypeId"))) { if (orderReadHelper.getRejectedOrderItems() && - "Y".equals(requestParameters.get("filterPOsWithRejectedItems"))) { + "Y".equals(parameters.get("filterPOsWithRejectedItems"))) { filterPOsWithRejectedItems.add(orderHeader.get("orderId")); paramList = paramList + "&filterPOsWithRejectedItems=" + "Y"; continue; } if (orderReadHelper.getPastEtaOrderItems(orderHeader.get("orderId")) && - "Y".equals(requestParameters.get("filterPOsOpenPastTheirETA"))) { + "Y".equals(parameters.get("filterPOsOpenPastTheirETA"))) { filterPOsOpenPastTheirETA.add(orderHeader.get("orderId")); continue; } if (orderReadHelper.getPartiallyReceivedItems() && - "Y".equals(requestParameters.get("filterPartiallyReceivedPOs"))) { + "Y".equals(parameters.get("filterPartiallyReceivedPOs"))) { filterPartiallyReceivedPOs.add(orderHeader.get("orderId")); paramList = paramList + "&filterPartiallyReceivedPOs=" + "Y"; continue; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh?view=diff&rev=506575&r1=506574&r2=506575 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh Mon Feb 12 10:50:26 2007 @@ -17,8 +17,7 @@ import org.ofbiz.base.util.UtilMisc; -dispatcher = request.getAttribute("dispatcher"); -prepare = dispatcher.runSync("prepareFind", UtilMisc.toMap("inputFields", requestParameters, "entityName", "Requirement")); -results = dispatcher.runSync("getRequirementsForSupplier", UtilMisc.toMap("requirementConditions", prepare.get("entityConditionList"), "partyId", requestParameters.get("partyId"))); +prepare = dispatcher.runSync("prepareFind", UtilMisc.toMap("inputFields", parameters, "entityName", "Requirement")); +results = dispatcher.runSync("getRequirementsForSupplier", UtilMisc.toMap("requirementConditions", prepare.get("entityConditionList"), "partyId", parameters.get("partyId"))); context.put("requirementsForSupplier", results.get("requirementsForSupplier")); context.put("quantityReport", UtilMisc.toMap("distinctProductCount", results.get("distinctProductCount"), "quantityTotal", results.get("quantityTotal"))); |
Free forum by Nabble | Edit this page |