You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2015/05/19 14:43:54 UTC

svn commit: r1680274 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

Author: deepak
Date: Tue May 19 12:43:54 2015
New Revision: 1680274

URL: http://svn.apache.org/r1680274
Log:
Added locale and timeZone as a service in parameter for groovy dsl. Now locale and timeZone not passed as service in parameter then groovy dsl will get it from context and passed as service in parameter.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy?rev=1680274&r1=1680273&r2=1680274&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy Tue May 19 12:43:54 2015
@@ -30,6 +30,12 @@ abstract class GroovyBaseScript extends
         if (!inputMap.userLogin) {
             inputMap.userLogin = this.binding.getVariable('parameters').userLogin;
         }
+        if (!inputMap.timeZone) {
+            inputMap.timeZone = this.binding.getVariable('parameters').timeZone;
+        }
+        if (!inputMap.locale) {
+            inputMap.locale = this.binding.getVariable('parameters').locale;
+        }
         Map result = binding.getVariable('dispatcher').runSync(serviceName, inputMap);
         if (ServiceUtil.isError(result)) {
             throw new ExecutionServiceException(ServiceUtil.getErrorMessage(result))