IDEMPIERE-3557 Field dependency analysis doesn't work with context variable using the : notation

This commit is contained in:
Heng Sin Low 2017-11-13 10:16:27 +08:00
parent 87db420650
commit 8385b79f0a
2 changed files with 4 additions and 1 deletions

View File

@ -2794,7 +2794,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
{
MLookup mLookup = (MLookup)dependentField.getLookup();
// if the lookup is dynamic (i.e. contains this columnName as variable)
if (mLookup.getValidation().indexOf("@"+columnName+"@") != -1)
if (mLookup.getValidation().indexOf("@"+columnName+"@") != -1
|| mLookup.getValidation().matches(".*[@]"+columnName+"[:].+[@].*$"))
{
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
+ dependentField.getColumnName() + " set to null");

View File

@ -293,6 +293,8 @@ public class Evaluator
variable = variable.replaceFirst("[0-9][0-9]*\\|", "");
if (variable.indexOf(".") > 0)
variable = variable.substring(0, variable.indexOf("."));
if (variable.indexOf(":") > 0)
variable = variable.substring(0, variable.indexOf(":"));
list.add(variable);
}
} // parseDepends