PartialPageContext pprContext = RenderingContext.getCurrentInstance().getPartialPageContext();
// if we finished rendering all of the destired targets, return that we are
// done. Otherwise, reject this subtree so that we don't traverse into it, since
// we have already rendered all of the targets in it
if (pprContext.areAllTargetsProcessed())
return VisitResult.COMPLETE;
else
return VisitResult.REJECT;
}
}