You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2013/09/05 16:07:06 UTC
svn commit: r1520319 -
/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
Author: jacopoc
Date: Thu Sep 5 14:07:05 2013
New Revision: 1520319
URL: http://svn.apache.org/r1520319
Log:
Implemented the ability to specify an event (success) message in Groovy events when success(GString) is invoked.
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=1520319&r1=1520318&r2=1520319&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 Thu Sep 5 14:07:05 2013
@@ -57,6 +57,9 @@ abstract class GroovyBaseScript extends
// TODO: implement some clever i18n mechanism based on the userLogin and locale in the binding
if (this.binding.getVariable('request')) {
// the script is invoked as an "event"
+ if (message) {
+ this.binding.getVariable('request').setAttribute("_EVENT_MESSAGE_", message)
+ }
return 'success';
} else {
// the script is invoked as a "service"