[OFBiz] SVN: r5012 - in trunk/applications/product/webapp/catalog: WEB-INF/actions/product product

jacopo at svn.ofbiz.org jacopo at svn.ofbiz.org
Fri May 20 12:50:19 EDT 2005


Author: jacopo
Date: 2005-05-20 11:50:08 -0500 (Fri, 20 May 2005)
New Revision: 5012

Modified:
   trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.bsh
   trunk/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl
   trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
Log:
Applied patch for bug reported/fixed in jira OFBIZ-246 (the selected feature application type was ignored): thanks to Jacques Le Roux for this. I have slightly modified the patch and also fixed another bug I found in the way (the productId field was sent twice to the page). 


Modified: trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.bsh
===================================================================
--- trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.bsh	2005-05-20 16:04:02 UTC (rev 5011)
+++ trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.bsh	2005-05-20 16:50:08 UTC (rev 5012)
@@ -43,6 +43,9 @@
 productFeatureCategoryId = request.getParameter("productFeatureCategoryId");
 context.put("productFeatureCategoryId", productFeatureCategoryId);
 
+selFeatureApplTypeId = request.getParameter("productFeatureApplTypeId");
+context.put("selFeatureApplTypeId", selFeatureApplTypeId);
+
 curProductFeatureCategory = delegator.findByPrimaryKey("ProductFeatureCategory", UtilMisc.toMap("productFeatureCategoryId", productFeatureCategoryId));
 context.put("curProductFeatureCategory", curProductFeatureCategory);
 

Modified: trunk/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl	2005-05-20 16:04:02 UTC (rev 5011)
+++ trunk/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl	2005-05-20 16:50:08 UTC (rev 5012)
@@ -78,6 +78,7 @@
   </tr>
 <#assign rowCount = 0>
 <#if (listSize > 0)>
+<#assign selectedFeatureApplTypeId = selFeatureApplTypeId>
 <#list productFeatures as productFeature>
   <#assign curProductFeatureType = productFeature.getRelatedOneCache("ProductFeatureType")>
     <tr valign="middle" class="viewOneTR1">
@@ -88,7 +89,7 @@
         <td>
           <select name="productFeatureApplTypeId_o_${rowCount}" size="1" class="selectBox">
             <#list productFeatureApplTypes as productFeatureApplType>
-              <option value="${productFeatureApplType.productFeatureApplTypeId}" <#if (defaultFeatureApplTypeId?has_content) && (productFeatureApplType.productFeatureApplTypeId == defaultFeatureApplTypeId)>selected</#if>>${productFeatureApplType.description}</option>
+              <option value="${productFeatureApplType.productFeatureApplTypeId}" <#if (selectedFeatureApplTypeId?has_content) && (productFeatureApplType.productFeatureApplTypeId == selectedFeatureApplTypeId)>selected</#if>>${productFeatureApplType.description}</option>
             </#list>
           </select>
         </td>

Modified: trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl	2005-05-20 16:04:02 UTC (rev 5011)
+++ trunk/applications/product/webapp/catalog/product/EditProductFeatures.ftl	2005-05-20 16:50:08 UTC (rev 5012)
@@ -93,7 +93,7 @@
         </table>
 
         <br/>
-        <form method="post" action="<@ofbizUrl>/ApplyFeaturesFromCategory?productId=${productId}</@ofbizUrl>" style='margin: 0;'>
+        <form method="post" action="<@ofbizUrl>/ApplyFeaturesFromCategory</@ofbizUrl>" style='margin: 0;'>
         <input type="hidden" name="productId" value="${productId}">
         <div class='head2'>${uiLabelMap.ProductAddProductFeatureFromCategory}:</div>
         <br/>



More information about the Svn mailing list