Author: adrianc
Date: Fri Apr 27 11:12:43 2012
New Revision: 1331353
URL:
http://svn.apache.org/viewvc?rev=1331353&view=revLog:
Bug fix in overhauled Mini-language <set> element: support operator substitutions in scriptlets.
Modified:
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java
Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java?rev=1331353&r1=1331352&r2=1331353&view=diff==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java Fri Apr 27 11:12:43 2012
@@ -25,6 +25,7 @@ import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.ObjectType;
import org.ofbiz.base.util.Scriptlet;
+import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.collections.FlexibleMapAccessor;
import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.minilang.MiniLangException;
@@ -111,7 +112,7 @@ public final class SetOperation extends
this.fieldFma = FlexibleMapAccessor.getInstance(element.getAttribute("field"));
String fromAttribute = element.getAttribute("from");
if (MiniLangUtil.containsScript(fromAttribute)) {
- this.scriptlet = new Scriptlet(fromAttribute);
+ this.scriptlet = new Scriptlet(StringUtil.convertOperatorSubstitutions(fromAttribute));
this.fromFma = FlexibleMapAccessor.getInstance(null);
} else {
this.scriptlet = null;