[OFBiz] SVN: r7046 - in trunk/applications/product: script/org/ofbiz/product/product webapp/catalog/product

jacopo@svn.ofbiz.org jacopo at svn.ofbiz.org
Wed Mar 22 03:34:43 CST 2006


Author: jacopo
Date: 2006-03-22 03:34:30 -0600 (Wed, 22 Mar 2006)
New Revision: 7046

Modified:
   trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
   trunk/applications/product/webapp/catalog/product/ProductForms.xml
Log:
Added logic in the "createProduct" service to fill with default values ("N") the isVirtual and isVariant fields and the billOfMaterialLevel field (0).
Also modified the drop down boxes for the isVirtual and isVariant fields in the "edit product" form to not allow for empty values.


Modified: trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
===================================================================
--- trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml	2006-03-22 08:46:16 UTC (rev 7045)
+++ trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml	2006-03-22 09:34:30 UTC (rev 7046)
@@ -53,6 +53,15 @@
         <set from-field="nowTimestamp" field="newEntity.lastModifiedDate"/>
         <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/>
         <set from-field="userLogin.userLoginId" field="newEntity.createdByUserLogin"/>
+        <if-empty field-name="newEntity.isVariant">
+            <set field="newEntity.isVariant" value="N"/>
+        </if-empty>
+        <if-empty field-name="newEntity.isVirtual">
+            <set field="newEntity.isVirtual" value="N"/>
+        </if-empty>
+        <if-empty field-name="newEntity.billOfMaterialLevel">
+            <set field="newEntity.billOfMaterialLevel" value="0" type="Integer"/>
+        </if-empty>
 
         <create-value value-name="newEntity"/>
 

Modified: trunk/applications/product/webapp/catalog/product/ProductForms.xml
===================================================================
--- trunk/applications/product/webapp/catalog/product/ProductForms.xml	2006-03-22 08:46:16 UTC (rev 7045)
+++ trunk/applications/product/webapp/catalog/product/ProductForms.xml	2006-03-22 09:34:30 UTC (rev 7046)
@@ -40,10 +40,10 @@
         <field use-when="product==null&amp;&amp;productId!=null" name="productId" title="${uiLabelMap.ProductProductId}" tooltip="${uiLabelMap.ProductNotFindProductId} [${productId}]"><text size="20" maxlength="20"/></field>
 
         <field position="1" name="isVirtual" title="${uiLabelMap.ProductVirtualProduct}" widget-style="selectBox">
-            <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}" /><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
+            <drop-down><option key="N" description="${uiLabelMap.CommonN}"/><option key="Y" description="${uiLabelMap.CommonY}"/></drop-down>
         </field>
         <field position="2" name="isVariant" title="${uiLabelMap.ProductVariantProduct}" widget-style="selectBox">
-            <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
+            <drop-down><option key="N" description="${uiLabelMap.CommonN}"/><option key="Y" description="${uiLabelMap.CommonY}"/></drop-down>
         </field>
         <field name="productTypeId" title="${uiLabelMap.ProductProductType}" widget-style="selectBox">
             <drop-down>



More information about the Svn mailing list