You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2012/03/22 07:12:49 UTC
svn commit: r1303662 - in /ofbiz/trunk/applications/product:
script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
Author: hansbak
Date: Thu Mar 22 06:12:49 2012
New Revision: 1303662
URL: http://svn.apache.org/viewvc?rev=1303662&view=rev
Log:
In image management browsing an image caused the upload service to start: fixed
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml?rev=1303662&r1=1303661&r2=1303662&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml Thu Mar 22 06:12:49 2012
@@ -23,7 +23,7 @@ under the License.
<simple-method method-name="UploadProductImages" short-description="Method to upload multiple images for product">
<set-service-fields service-name="addMultipleuploadForProduct" map="parameters" to-map="addAdditionalViewForProductMap"/>
- <if-not-empty field="parameters.additionalImageOne">
+ <if-not-empty field="parameters._additionalImageOne_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageOne"/>
@@ -33,7 +33,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageTwo">
+ <if-not-empty field="parameters._additionalImageTwo_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageTwo"/>
@@ -43,7 +43,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageThree">
+ <if-not-empty field="parameters._additionalImageThree_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageThree"/>
@@ -53,7 +53,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageFour">
+ <if-not-empty field="parameters._additionalImageFour_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageFour"/>
@@ -63,7 +63,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageFive">
+ <if-not-empty field="parameters._additionalImageFive_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageFive"/>
@@ -73,7 +73,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageSix">
+ <if-not-empty field="parameters._additionalImageSix_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageSix"/>
@@ -83,7 +83,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageSeven">
+ <if-not-empty field="parameters._additionalImageSeven_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageSeven"/>
@@ -93,7 +93,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageEight">
+ <if-not-empty field="parameters._additionalImageEight_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageEight"/>
@@ -103,7 +103,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageNine">
+ <if-not-empty field="parameters._additionalImageNine_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageNine"/>
@@ -113,7 +113,7 @@ under the License.
<call-service service-name="addMultipleuploadForProduct" in-map-name="addAdditionalViewForProductMap"/>
<clear-field field="addAdditionalViewForProductMap"/>
</if-not-empty>
- <if-not-empty field="parameters.additionalImageTen">
+ <if-not-empty field="parameters._additionalImageTen_fileName">
<set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
<set field="addAdditionalViewForProductMap.imageResize" from-field="parameters.imageResize"/>
<set field="addAdditionalViewForProductMap.uploadedFile" from-field="parameters.additionalImageTen"/>
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1303662&r1=1303661&r2=1303662&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Thu Mar 22 06:12:49 2012
@@ -128,8 +128,7 @@ public class ImageManagementServices {
String contentId = (String) contentResult.get("contentId");
result.put("contentFrameId", contentId);
- result.put("contentId", (String) context.get("contentId"));
- result.put("dataResourceId", (String) context.get("dataResourceId"));
+ result.put("contentId", contentId);
// File to use for original image
FlexibleStringExpander filenameExpander = FlexibleStringExpander.getInstance(imageFilenameFormat);
@@ -454,7 +453,9 @@ public class ImageManagementServices {
return ServiceUtil.returnError(e.getMessage());
}
- result.put("dataResourceFrameId", dataResourceResult.get("dataResourceId"));
+ String dataResourceId = (String) dataResourceResult.get("dataResourceId");
+ result.put("dataResourceFrameId", dataResourceId);
+ result.put("dataResourceId", dataResourceId);
Map<String, Object> contentUp = FastMap.newInstance();
contentUp.put("contentId", contentId);