Updated model widgets to use operator substitution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@772709 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1931,7 +1931,7 @@ public class ModelForm extends ModelWidget {
|
||||
Iterator altTargetIter = this.altTargets.iterator();
|
||||
while (altTargetIter.hasNext()) {
|
||||
AltTarget altTarget = (AltTarget) altTargetIter.next();
|
||||
Object retVal = bsh.eval(altTarget.useWhen);
|
||||
Object retVal = bsh.eval(StringUtil.convertOperatorSubstitutions(altTarget.useWhen));
|
||||
boolean condTrue = false;
|
||||
// retVal should be a Boolean, if not something weird is up...
|
||||
if (retVal instanceof Boolean) {
|
||||
@@ -2607,7 +2607,7 @@ public class ModelForm extends ModelWidget {
|
||||
// use the same Interpreter (ie with the same context setup) for all evals
|
||||
Interpreter bsh = this.getBshInterpreter(context);
|
||||
for (AltRowStyle altRowStyle : this.altRowStyles) {
|
||||
Object retVal = bsh.eval(altRowStyle.useWhen);
|
||||
Object retVal = bsh.eval(StringUtil.convertOperatorSubstitutions(altRowStyle.useWhen));
|
||||
// retVal should be a Boolean, if not something weird is up...
|
||||
if (retVal instanceof Boolean) {
|
||||
Boolean boolVal = (Boolean) retVal;
|
||||
|
||||
@@ -2404,7 +2404,7 @@ public class ModelFormField {
|
||||
context.put("bshInterpreter", bsh);
|
||||
}
|
||||
|
||||
Object retVal = bsh.eval(useWhen);
|
||||
Object retVal = bsh.eval(StringUtil.convertOperatorSubstitutions(useWhen));
|
||||
|
||||
// retVal should be a Boolean, if not something weird is up...
|
||||
if (retVal instanceof Boolean) {
|
||||
|
||||
Reference in New Issue
Block a user