this.addWarning("No expression given");
return;
}
ExpressionEngine engine = ExpressionEngineFactory.getEngine(this.getExpressionlanguage());
ExpressionResult result = engine.evaluateExpression(this.getExpression(), this.getTMLContext(), ExpressionEngine.TYPE_EXPRESSION, null);
if (result.isError()) {
this.addWarning("Error in group change expression evaluation: " + result.getException().getMessage() + " (Expression: " + result.getException().getExpression() + ")", true);
return;
}
Object previousResult = this.pageContext.getAttribute(this.getClass().getName() + ":PreviousResult_" + this.getId(), PageContext.REQUEST_SCOPE);
if (previousResult == null && result.getResult() == null) {
this.setEvalBody(false);
}
else if (previousResult != null && result.getResult() != null && result.getResult().equals(previousResult)) {
this.setEvalBody(false);
}
else {
this.pageContext.setAttribute(this.getClass().getName() + ":PreviousResult_" + this.getId(), result.getResult(), PageContext.REQUEST_SCOPE);
}
}