try {
ExpressionFactory f = ctx.getExpressionFactory();
if (ELUtils.isCompositeComponentLookupWithArgs(this.value)) {
String message =
MessageUtils.getExceptionMessageString(ARGUMENTS_NOT_LEGAL_CC_ATTRS_EXPR);
throw new TagAttributeException(this, message);
}
// Determine if this is a composite component attribute lookup.
// If so, look for a MethodExpression under the attribute key
if (ELUtils.isCompositeComponentMethodExprLookup(this.value)) {
result = new AttributeLookupMethodExpression(getValueExpression(ctx, MethodExpression.class));
} else if (ELUtils.isCompositeComponentExpr(this.value)) {
MethodExpression delegate = new TagMethodExpression(this,
f.createMethodExpression(ctx,
this.value,
type,
paramTypes));
result = new ContextualCompositeMethodExpression(getLocation(), delegate);
} else {
result = new TagMethodExpression(this,
f.createMethodExpression(ctx,
this.value,
type,
paramTypes));
}
} catch (Exception e) {
if (e instanceof TagAttributeException) {
throw (TagAttributeException) e;
} else {
throw new TagAttributeException(this, e);
}
}
return result;
}