public static java.lang.Object | evalNotNull(java.lang.String tagName, java.lang.String attributeName, java.lang.String expression, java.lang.Class expectedType, javax.servlet.jsp.tagext.Tag tag, javax.servlet.jsp.PageContext pageContext)Evaluates an expression if present, but does not allow the expression
to evaluate to 'null', throwing a NullAttributeException if it
does. The function can return null, however, if the
expression itself is null.
if (expression != null) {
Object r = ExpressionEvaluatorManager.evaluate(
attributeName, expression, expectedType, tag, pageContext);
if (r == null)
throw new NullAttributeException(tagName, attributeName);
return r;
} else
return null;
|