svn commit: r1001046 - /ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml

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

svn commit: r1001046 - /ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml

jleroux@apache.org
Author: jleroux
Date: Fri Sep 24 19:38:29 2010
New Revision: 1001046

URL: http://svn.apache.org/viewvc?rev=1001046&view=rev
Log:
In linkGeos service I reversed the 2 geo (geo and GeoTo) in GeoAssoc creation

Modified:
    ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml

Modified: ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml?rev=1001046&r1=1001045&r2=1001046&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml (original)
+++ ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml Fri Sep 24 19:38:29 2010
@@ -271,35 +271,35 @@ under the License.
 
     <simple-method method-name="linkGeos" short-description="Link Geos to another Geo">
         <entity-and entity-name="GeoAssoc" list="geoAssocs">
-            <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+            <field-map field-name="geoId" from-field="parameters.geoId"/>
         </entity-and>
         <!-- Current list contains old values? -->
         <iterate list="geoAssocs" entry="geoAssoc">
-            <if-compare-field field="parameters.geoIds" operator="contains" to-field="geoAssoc.geoId">
+            <if-compare-field field="parameters.geoIds" operator="contains" to-field="geoAssoc.geoIdTo">
                 <!-- Yes, nothing to do, it already exists and we keep it -->
                 <else><!-- Remove -->
                     <entity-one entity-name="GeoAssoc" value-field="oldGeoAssoc">
-                        <field-map field-name="geoId" from-field="geoAssoc.geoId"/>
-                        <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+                        <field-map field-name="geoId" from-field="parameters.geoId"/>
+                        <field-map field-name="geoIdTo" from-field="geoAssoc.geoIdTo"/>
                     </entity-one>
                     <remove-value value-field="oldGeoAssoc"/>
                 </else>                
             </if-compare-field>
         </iterate>
         <!-- Old list contains current values -->
-        <iterate list="parameters.geoIds" entry="geoId">            
-            <if-compare-field field="oldGeoIds" operator="contains" to-field="geoId">
+        <iterate list="parameters.geoIds" entry="geoIdTo">            
+            <if-compare-field field="oldGeoIds" operator="contains" to-field="geoIdTo">
                 <!-- Yes, nothing to do, it already exists and we keep it -->
                 <else>
                     <entity-one entity-name="GeoAssoc" value-field="oldGeoAssoc">
-                        <field-map field-name="geoId" from-field="geoId"/>
-                        <field-map field-name="geoIdTo" from-field="parameters.geoId"/>
+                        <field-map field-name="geoId" from-field="parameters.geoId"/>
+                        <field-map field-name="geoIdTo" from-field="geoIdTo"/>
                     </entity-one>
                     <if-empty field="oldGeoAssoc">                    
                         <!-- Add as it does not exist -->
                         <make-value value-field="newGeoAssoc" entity-name="GeoAssoc"/>
-                        <set field="newGeoAssoc.geoId" from-field="geoId"/>
-                        <set field="newGeoAssoc.geoIdTo" from-field="parameters.geoId"/>
+                        <set field="newGeoAssoc.geoId" from-field="parameters.geoId"/>
+                        <set field="newGeoAssoc.geoIdTo" from-field="geoIdTo"/>
                         <set field="newGeoAssoc.geoAssocTypeId" from-field="parameters.geoAssocTypeId"/>
                         <create-value value-field="newGeoAssoc"/>
                     </if-empty>