Author: jacopoc
Date: Wed Mar 14 07:40:31 2012
New Revision: 1300473
URL:
http://svn.apache.org/viewvc?rev=1300473&view=revLog:
Services and events methods are defined with a methods without arguments (or a script): as usual the input fields are available in the context (Bindings)
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/ScriptEngine.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ScriptEventHandler.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/ScriptEngine.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/ScriptEngine.java?rev=1300473&r1=1300472&r2=1300473&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/ScriptEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/ScriptEngine.java Wed Mar 14 07:40:31 2012
@@ -84,7 +84,7 @@ public final class ScriptEngine extends
context.put("delegator", dispatcher.getDelegator());
try {
ScriptContext scriptContext = ScriptUtil.createScriptContext(context, protectedKeys);
- Object resultObj = ScriptUtil.executeScript(getLocation(modelService), modelService.invoke, scriptContext, new Object[] { context });
+ Object resultObj = ScriptUtil.executeScript(getLocation(modelService), modelService.invoke, scriptContext, null);
if (resultObj == null) {
resultObj = scriptContext.getAttribute(ScriptUtil.RESULT_KEY);
}
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ScriptEventHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ScriptEventHandler.java?rev=1300473&r1=1300472&r2=1300473&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ScriptEventHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ScriptEventHandler.java Wed Mar 14 07:40:31 2012
@@ -99,7 +99,7 @@ public final class ScriptEventHandler im
Object result = null;
try {
ScriptContext scriptContext = ScriptUtil.createScriptContext(context, protectedKeys);
- result = ScriptUtil.executeScript(event.path, event.invoke, scriptContext, new Object[] { context });
+ result = ScriptUtil.executeScript(event.path, event.invoke, scriptContext, null);
if (result == null) {
result = scriptContext.getAttribute(ScriptUtil.RESULT_KEY);
}