Author: hansbak
Date: Wed Dec 31 21:52:59 2008 New Revision: 730511 URL: http://svn.apache.org/viewvc?rev=730511&view=rev Log: some minilanguage code changes Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=730511&r1=730510&r2=730511&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Wed Dec 31 21:52:59 2008 @@ -34,7 +34,7 @@ <if-empty field="newEntity.productId"> <sequenced-id sequence-name="Product" field="newEntity.productId"/> <else> - <check-id field-name="productId" map-name="newEntity"/> + <check-id field="newEntity.productId"/> <check-errors/> </else> </if-empty> @@ -141,7 +141,7 @@ <!-- get all productAssocs, then get the actual product to update --> <find-by-and entity-name="ProductAssoc" map="variantProductAssocMap" list="variantProductAssocs"/> - <filter-list-by-date list-name="variantProductAssocs"/> + <filter-list-by-date list="variantProductAssocs"/> <iterate entry="variantProductAssoc" list="variantProductAssocs"> <clear-field field="variantProduct"/> <entity-one entity-name="Product" value-field="variantProduct" auto-field-map="false"> @@ -168,7 +168,7 @@ <entity-one entity-name="Product" value-field="oldProduct" auto-field-map="false"> <field-map field-name="productId" from-field="parameters.oldProductId"/> </entity-one> - <clone-value value-name="oldProduct" new-value-name="newProduct"/> + <clone-value value-field="oldProduct" new-value-field="newProduct"/> <!-- set the productId, and write it to the datasource --> <set from-field="parameters.productId" field="newProduct.productId"/> @@ -203,7 +203,7 @@ <if-not-empty field="parameters.duplicatePrices"> <find-by-and entity-name="ProductPrice" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -211,7 +211,7 @@ <if-not-empty field="parameters.duplicateIDs"> <find-by-and entity-name="GoodIdentification" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -219,7 +219,7 @@ <if-not-empty field="parameters.duplicateContent"> <find-by-and entity-name="ProductContent" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -227,7 +227,7 @@ <if-not-empty field="parameters.duplicateCategoryMembers"> <find-by-and entity-name="ProductCategoryMember" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -235,7 +235,7 @@ <if-not-empty field="parameters.duplicateAssocs"> <find-by-and entity-name="ProductAssoc" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -245,7 +245,7 @@ <field-map field-name="productIdTo" from-field="parameters.oldProductId"/> </entity-and> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productIdTo"/> <create-value value-field="newTempValue"/> </iterate> @@ -253,7 +253,7 @@ <if-not-empty field="parameters.duplicateAttributes"> <find-by-and entity-name="ProductAttribute" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -261,7 +261,7 @@ <if-not-empty field="parameters.duplicateFeatureAppls"> <find-by-and entity-name="ProductFeatureAppl" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -278,7 +278,7 @@ TODO: is this code correct? What is the meaning of duplicating inventory items? What about the InventoryItemDetail entries? --> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="parameters.productId" field="newTempValue.productId"/> <!-- this one is slightly different because it needs a new sequenced inventoryItemId --> <sequenced-id sequence-name="InventoryItem" field="newTempValue.inventoryItemId"/> @@ -288,30 +288,30 @@ <!-- if requested, remove related data as well --> <if-not-empty field="parameters.removePrices"> - <remove-by-and entity-name="ProductPrice" map-name="productFindContext"/> + <remove-by-and entity-name="ProductPrice" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeIDs"> - <remove-by-and entity-name="GoodIdentification" map-name="productFindContext"/> + <remove-by-and entity-name="GoodIdentification" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeContent"> - <remove-by-and entity-name="ProductContent" map-name="productFindContext"/> + <remove-by-and entity-name="ProductContent" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeCategoryMembers"> - <remove-by-and entity-name="ProductCategoryMember" map-name="productFindContext"/> + <remove-by-and entity-name="ProductCategoryMember" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeAssocs"> - <remove-by-and entity-name="ProductAssoc" map-name="productFindContext"/> + <remove-by-and entity-name="ProductAssoc" map="productFindContext"/> <!-- small difference here, also do the reverse assocs... --> - <remove-by-and entity-name="ProductAssoc" map-name="reverseProductFindContext"/> + <remove-by-and entity-name="ProductAssoc" map="reverseProductFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeAttributes"> - <remove-by-and entity-name="ProductAttribute" map-name="productFindContext"/> + <remove-by-and entity-name="ProductAttribute" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeFeatureAppls"> - <remove-by-and entity-name="ProductFeatureAppl" map-name="productFindContext"/> + <remove-by-and entity-name="ProductFeatureAppl" map="productFindContext"/> </if-not-empty> <if-not-empty field="parameters.removeInventoryItems"> - <remove-by-and entity-name="InventoryItem" map-name="productFindContext"/> + <remove-by-and entity-name="InventoryItem" map="productFindContext"/> </if-not-empty> </simple-method> @@ -612,7 +612,7 @@ <set from-field="parameters.virtualProductId" field="variantsFindContext.productId"/> <set value="PRODUCT_VARIANT" field="variantsFindContext.productAssocTypeId"/> <find-by-and entity-name="ProductAssoc" map="variantsFindContext" list="variants"/> - <filter-list-by-date list-name="variants"/> + <filter-list-by-date list="variants"/> <iterate entry="newProduct" list="variants"> <set from-field="newProduct.productIdTo" field="productVariantContext.productId"/> <!-- if requested, duplicate related data --> @@ -625,7 +625,7 @@ </if-not-empty> <find-by-and entity-name="ProductPrice" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -639,7 +639,7 @@ </if-not-empty> <find-by-and entity-name="GoodIdentification" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -653,7 +653,7 @@ </if-not-empty> <find-by-and entity-name="ProductContent" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -667,7 +667,7 @@ </if-not-empty> <find-by-and entity-name="ProductCategoryMember" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -681,7 +681,7 @@ </if-not-empty> <find-by-and entity-name="ProductAttribute" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -695,7 +695,7 @@ </if-not-empty> <find-by-and entity-name="ProductFacility" map="productFindContext" list="foundValues"/> <iterate entry="foundValue" list="foundValues"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -709,7 +709,7 @@ </if-not-empty> <find-by-and entity-name="ProductFacilityLocation" map="productFindContext" list="foundValues"/> <iterate list="foundValues" entry="foundValue"> - <clone-value value-name="foundValue" new-value-name="newTempValue"/> + <clone-value value-field="foundValue" new-value-field="newTempValue"/> <set from-field="newProduct.productIdTo" field="newTempValue.productId"/> <create-value value-field="newTempValue"/> </iterate> @@ -856,8 +856,8 @@ <set from-field="userLogin.partyId" field="lookupRoleCategoriesMap.partyId"/> <set value="LTD_ADMIN" field="lookupRoleCategoriesMap.roleTypeId"/> <find-by-and entity-name="ProductCategoryMemberAndRole" map="lookupRoleCategoriesMap" list="roleCategories"/> - <filter-list-by-date list-name="roleCategories"/> - <filter-list-by-date list-name="roleCategories" from-field-name="roleFromDate" thru-field-name="roleThruDate"/> + <filter-list-by-date list="roleCategories"/> + <filter-list-by-date list="roleCategories" from-field-name="roleFromDate" thru-field-name="roleThruDate"/> </then> </if> <if> |
Free forum by Nabble | Edit this page |