public static void encodeChildren(FacesContext facesContext,
UIComponent panel)
throws IOException {
// UIComponent layout = panel.getFacet("layout");
UILayout layout = UILayout.getLayout(panel);
if (layout != null) {
layout.encodeChildrenOfComponent(facesContext, panel);
} else {
for (Iterator i = panel.getChildren().iterator(); i.hasNext();) {
UIComponent child = (UIComponent) i.next();
encode(facesContext, child);
}