//Apply only if we are creating a new component
if (!ComponentHandler.isNew(parent))
{
if (_wrapMode)
{
AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
// In this case it will be only applied to components inserted by
// c:if or related tags, in other cases, ComponentTagHandlerDelegate should
// not reapply ajax tag.
actx.pushAjaxHandlerToStack(this);
nextHandler.apply(ctx, parent);
actx.popAjaxHandlerToStack();
}
return;
}
if (_wrapMode)
{
AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
// Push and pop this ajax handler to the stack, to delegate the
// call to applyAttachedObject to ComponentTagHandlerDelegate
// The default one proposed here is
// use a different stack on DefaultFaceletContext.applyCompositeComponent,
// so components inside composite:implementation tag will not be
// affected by f:ajax outsider handlers.
actx.pushAjaxHandlerToStack(this);
nextHandler.apply(ctx, parent);
actx.popAjaxHandlerToStack();
}
else
{
if (parent instanceof ClientBehaviorHolder)
{