//Store the method expression to the topLevelComponent to allow reference it through EL
if (!ccAttrMeRedirection)
{
//Replace it with a method expression
topLevelComponent.getAttributes().put(attributeName, new MethodExpressionMethodExpression(methodExpression, methodExpression2));
}
// Otherwise keep the current ValueExpression, because it will be used chain other value expressions
}
else if ("validator".equals(targetAttributeName))
{
// target is EditableValueHolder
methodExpression = reWrapMethodExpression(context.getApplication().getExpressionFactory().
createMethodExpression(elContext,
attributeExpressionString, Void.TYPE,
VALIDATOR_SIGNATURE), attributeNameValueExpression);
//Store the method expression to the topLevelComponent to allow reference it through EL
if (!ccAttrMeRedirection)
{
//Replace it with a method expression
topLevelComponent.getAttributes().put(attributeName, methodExpression);
}
// Otherwise keep the current ValueExpression, because it will be used chain other value expressions
}
else if ("valueChangeListener".equals(targetAttributeName))
{
// target is EditableValueHolder
methodExpression = reWrapMethodExpression(context.getApplication().getExpressionFactory().
createMethodExpression(elContext,
attributeExpressionString, Void.TYPE,
VALUE_CHANGE_LISTENER_SIGNATURE), attributeNameValueExpression);
methodExpression2 = reWrapMethodExpression(context.getApplication().getExpressionFactory().
createMethodExpression(elContext,
attributeExpressionString, Void.TYPE,
EMPTY_CLASS_ARRAY), attributeNameValueExpression);
//Store the method expression to the topLevelComponent to allow reference it through EL
if (!ccAttrMeRedirection)
{
//Replace it with a method expression
topLevelComponent.getAttributes().put(attributeName, new MethodExpressionMethodExpression(methodExpression, methodExpression2));
}
// Otherwise keep the current ValueExpression, because it will be used chain other value expressions
}
UIComponent topLevelComponentBase = topLevelComponent.getFacet(UIComponent.COMPOSITE_FACET_NAME);