UILayout.getLayout(component).encodeChildrenOfComponent(facesContext, component);
// RenderUtil.encodeChildren(facesContext, page);
// render popups into buffer
FastStringWriter popups = new FastStringWriter();
contentWriter = writer.cloneWithWriter(popups);
facesContext.setResponseWriter(contentWriter);
// write popup components
// beware of ConcurrentModificationException in cascating popups!
// no foreach