Author: jacopoc
Date: Wed Feb 19 14:26:11 2014
New Revision: 1569750

URL: http://svn.apache.org/r1569750
Log:
Applied fix from trunk for revision: 1569743 
===

Fixed MissingPropertyException happening when success method was called in the 
context of Groovy services: thanks to Paolo Piersant for the bug report and fix.



Modified:
    ofbiz/branches/release12.04/   (props changed)
    
ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1569743

Modified: 
ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy?rev=1569750&r1=1569749&r2=1569750&view=diff
==============================================================================
--- 
ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
 (original)
+++ 
ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
 Wed Feb 19 14:26:11 2014
@@ -20,7 +20,6 @@ package org.ofbiz.service.engine
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.service.ServiceUtil
-import org.ofbiz.service.GenericServiceException
 import org.ofbiz.service.ExecutionServiceException
 
 abstract class GroovyBaseScript extends Script {
@@ -55,7 +54,7 @@ abstract class GroovyBaseScript extends 
 
     def success(String message) {
         // TODO: implement some clever i18n mechanism based on the userLogin 
and locale in the binding
-        if (this.binding.getVariable('request')) {
+        if (this.binding.hasVariable('request')) {
             // the script is invoked as an "event"
             return 'success';
         } else {
@@ -77,7 +76,7 @@ abstract class GroovyBaseScript extends 
     }
     def error(String message) {
         // TODO: implement some clever i18n mechanism based on the userLogin 
and locale in the binding
-        if (this.binding.getVariable('request')) {
+        if (this.binding.hasVariable('request')) {
             // the script is invoked as an "event"
             if (message) {
                 
this.binding.getVariable('request').setAttribute("_ERROR_MESSAGE_", message)


Reply via email to