Author: jacopoc
Date: Wed Feb 19 14:09:09 2014
New Revision: 1569743
URL:
http://svn.apache.org/r1569743Log:
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/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=1569743&r1=1569742&r2=1569743&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 Wed Feb 19 14:09:09 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"
if (message) {
this.binding.getVariable('request').setAttribute("_EVENT_MESSAGE_", message)
@@ -80,7 +79,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)