protected void addComponentToView( FaceletContext ctx, UIComponent parent, UIComponent c, boolean componentFound) { FacesContext context = ctx.getFacesContext(); boolean suppressEvents = ComponentSupport.suppressViewModificationEvents(context); boolean compcomp = UIComponent.isCompositeComponent(c); if (suppressEvents && componentFound && !compcomp) { context.setProcessingEvents(false); } ComponentSupport.addComponent(ctx, parent, c); if (suppressEvents && componentFound && !compcomp) { context.setProcessingEvents(true); } }
protected void doOrphanedChildCleanup(FaceletContext ctx, UIComponent parent, UIComponent c) { ComponentSupport.finalizeForDeletion(c); if (getFacetName(parent) == null) { FacesContext context = ctx.getFacesContext(); boolean suppressEvents = ComponentSupport.suppressViewModificationEvents(context); if (suppressEvents) { // if the component has already been found, it will be removed // and added back to the view. We don't want to publish events // for this case. context.setProcessingEvents(false); } // suppress the remove event for this case since it will be re-added parent.getChildren().remove(c); if (suppressEvents) { // re-enable event processing context.setProcessingEvents(true); } } }