// hook method
owner.onComponentCreated(ctx, c, parent);
}
c.pushComponentToEL(ctx.getFacesContext(), c);
boolean compcompPushed = false;
CompositeComponentStackManager ccStackManager =
CompositeComponentStackManager.getManager(ctx.getFacesContext());
if (UIComponent.isCompositeComponent(c)) {
compcompPushed = ccStackManager.push(c, TreeCreation);
}
// first allow c to get populated
owner.applyNextHandler(ctx, c);
// finish cleaning up orphaned children
if (componentFound) {
ComponentSupport.finalizeForDeletion(c);
if (getFacetName(ctx, parent) == null) {
parent.getChildren().remove(c);
}
}
this.privateOnComponentPopulated(ctx, c, parent);
owner.onComponentPopulated(ctx, c, parent);
// add to the tree afterwards
// this allows children to determine if it's
// been part of the tree or not yet
ComponentSupport.addComponent(ctx, parent, c);
c.popComponentFromEL(ctx.getFacesContext());
if (compcompPushed) {
ccStackManager.pop(TreeCreation);
}
if (shouldMarkInitialState(ctx.getFacesContext())) {
c.markInitialState();
}