Author: jleroux
Date: Fri Nov 14 11:17:36 2014
New Revision: 1639608

URL: http://svn.apache.org/r1639608
Log:
"Applied fix from trunk for revision: 1639606" 
------------------------------------------------------------------------
r1639606 | jleroux | 2014-11-14 12:15:54 +0100 (ven. 14 nov. 2014) | 5 lignes

A patch from Pierre Gaudin for "use requestParameters for customMethod call" 
https://issues.apache.org/jira/browse/OFBIZ-5822

For a content, you can set a custom method that perform an action before 
content's rendering.
Unfortunately, in the customMethod call, the request Parameters can't be used 
because they are not set into the map that is used to create custom method IN 
parameters.
This patch solves this problem
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release13.07/   (props changed)
    
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1639606

Modified: 
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1639608&r1=1639607&r2=1639608&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java
 (original)
+++ 
ofbiz/branches/release13.07/applications/content/src/org/ofbiz/content/content/ContentWorker.java
 Fri Nov 14 11:17:36 2014
@@ -185,6 +185,8 @@ public class ContentWorker implements or
             DispatchContext dctx = dispatcher.getDispatchContext();
             ModelService service = dctx.getModelService(serviceName);
             if (service != null) {
+                //put all requestParameters into templateContext to use them 
as IN service parameters
+                templateContext.putAll((Map<String, 
Object>)templateContext.get("requestParameters"));
                 Map<String,Object> serviceCtx = 
service.makeValid(templateContext, ModelService.IN_PARAM);
                 Map<String,Object> serviceRes;
                 try {


Reply via email to