svn commit: r786429 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java

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

svn commit: r786429 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java

lektran
Author: lektran
Date: Fri Jun 19 09:34:23 2009
New Revision: 786429

URL: http://svn.apache.org/viewvc?rev=786429&view=rev
Log:
getProductFeatureSet had productFeatureApplTypeId as an optional parameter but wasn't doing anything with it

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=786429&r1=786428&r2=786429&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Fri Jun 19 09:34:23 2009
@@ -145,12 +145,16 @@
         // * String productId      -- Product ID to look up feature types
         GenericDelegator delegator = dctx.getDelegator();
         String productId = (String) context.get("productId");
+        String productFeatureApplTypeId = (String) context.get("productFeatureApplTypeId");
+        if (UtilValidate.isEmpty(productFeatureApplTypeId)) {
+            productFeatureApplTypeId = "SELECTABLE_FEATURE";
+        }
         Locale locale = (Locale) context.get("locale");
         String errMsg=null;
         Set<String> featureSet = new LinkedHashSet<String>();
 
         try {
-            Map<String, String> fields = UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "SELECTABLE_FEATURE");
+            Map<String, String> fields = UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", productFeatureApplTypeId);
             List<String> order = UtilMisc.toList("sequenceNum", "productFeatureTypeId");
             List<GenericValue> features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
             for (GenericValue v: features) {