// ----------------------------------------------------- Private Methods
private boolean pushCompositeComponent(FacesContext ctx) {
CompositeComponentStackManager manager =
CompositeComponentStackManager.getManager(ctx);
UIComponent foundCc = null;
if (location != null) {
foundCc = manager.findCompositeComponentUsingLocation(ctx, location);
} else {
// We need to obtain the Location of the source expression in order
// to find the composite component that needs to be available within
// the evaluation stack.
if (source instanceof TagValueExpression) {
ValueExpression orig = ((TagValueExpression) source).getWrapped();
if (orig instanceof ContextualCompositeValueExpression) {
foundCc = manager.findCompositeComponentUsingLocation(ctx, ((ContextualCompositeValueExpression) orig).getLocation());
}
}
}
if (null == foundCc) {
foundCc = ctx.getViewRoot().findComponent(ccClientId);
}
return manager.push(foundCc);
}