[ 
https://issues.apache.org/jira/browse/OFBIZ-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626103#action_12626103
 ] 

Jacques Le Roux commented on OFBIZ-1930:
----------------------------------------

Thanks for review and comments Vikas,

I think that using map.put is fine when you deal with at least one long 
parameter. I believe using UtilMisc.toMap in such cases does not clarify the 
code

I other words UtilMisc.toMap is good if all parameters are kind of << 
"productId", productId>> or if there are few parameters. 
But less when it comes to "dataResourceName", (String) 
context.get("_imageFile_fileName" and more than say 2/3 parameters. 
Then I prefer to use map.put style. IMO having them on more lines help to read 
the code, and it's not too hard to duplicate.

uploadFileInterface is a nice catch !
attachUploadToDataResource and createContentFromUploadedFile are good examples 
I think. I did not look further yet...

> Added support for uploading additional Product Views (images)
> -------------------------------------------------------------
>
>                 Key: OFBIZ-1930
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1930
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Mridul Pathak
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: ProductAdditionalViews.patch, 
> ProductAdditionalViews.patch
>
>
> Defined four ProductContentType's to support four additional views (images) 
> to a Product.  Extended EditProductContent screen to support uploading these 
> additional images.  New service for the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to