svn commit: r530480 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/category/CategoryServices.xml webapp/catalog/category/CategoryForms.xml

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

svn commit: r530480 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/category/CategoryServices.xml webapp/catalog/category/CategoryForms.xml

jaz-3
Author: jaz
Date: Thu Apr 19 09:41:47 2007
New Revision: 530480

URL: http://svn.apache.org/viewvc?view=rev&rev=530480
Log:
changed imageTwoUrl to be hidden from list display; changed create method so that fromDate does not effect the generation of the linkSeqId; was causing the key to be 00001 everytime due to the unique fromDate

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
    ofbiz/trunk/applications/product/webapp/catalog/category/CategoryForms.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?view=diff&rev=530480&r1=530479&r2=530480
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Thu Apr 19 09:41:47 2007
@@ -667,14 +667,20 @@
     <!-- ProductCategoryLink Create/Update/Delete"-->
     <simple-method method-name="createProductCategoryLink" short-description="create a ProductCategoryLink">
         <make-value entity-name="ProductCategoryLink" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <set field="newEntity.productCategoryId" from-field="parameters.productCategoryId"/>
+
+        <!-- don't set the fromDate yet; let's get the seq ID first -->
         <if-empty field-name="parameters.linkSeqId">
             <make-next-seq-id value-name="newEntity" seq-field-name="linkSeqId"/> <!-- this finds the next sub-sequence ID -->
             <set from-field="linkSeqId" field="newEntity.linkSeqId"/>
-        </if-empty>    
+        </if-empty>
+
+        <!-- now set the rest of the PK fields (should just be fromDate now; unless linkSeqId is not empty -->
+        <set-pk-fields value-name="newEntity" map-name="parameters"/>
         <if-empty field-name="newEntity.fromDate">
             <now-timestamp-to-env env-name="newEntity.fromDate"/>
         </if-empty>
+
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <create-value value-name="newEntity"/>  
     </simple-method>  

Modified: ofbiz/trunk/applications/product/webapp/catalog/category/CategoryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/category/CategoryForms.xml?view=diff&rev=530480&r1=530479&r2=530480
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/category/CategoryForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/category/CategoryForms.xml Thu Apr 19 09:41:47 2007
@@ -135,7 +135,8 @@
         <field name="detailText"><ignored/></field>
         <field name="linkInfo"><ignored/></field>
         <field name="detailSubScreen"><ignored/></field>
-        <field name="imageUrl"><ignored/></field>        
+        <field name="imageUrl"><ignored/></field>
+        <field name="imageTwoUrl"><ignored/></field>      
         <field name="deleteLink" title="" widget-style="buttontext">
             <hyperlink target="deleteProductCategoryLink?productCategoryId=${productCategoryId}&amp;linkSeqId=${linkSeqId}&amp;fromDate=${fromDate}"
                 description="${uiLabelMap.CommonDelete}" also-hidden="false"/>