Author: jacopoc
Date: Fri Apr 13 13:10:59 2012
New Revision: 1325750
URL:
http://svn.apache.org/viewvc?rev=1325750&view=revLog:
Based on a suggestion by Adrian Crum, data preparation scripts can now be implemented with script methods that accept a Map context argument, for example:
def dataPreparationMethod(Map context) {
...
}
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java?rev=1325750&r1=1325749&r2=1325750&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java Fri Apr 13 13:10:59 2012
@@ -321,7 +321,7 @@ public final class ScriptUtil {
* @throws IllegalArgumentException
*/
public static Object executeScript(String filePath, String functionName, Map<String, Object> context) {
- return executeScript(filePath, functionName, context, EMPTY_ARGS);
+ return executeScript(filePath, functionName, context, new Object[] { context });
}
/**