示例#1
0
 public static void renderChildren(FacesContext context, UIComponent component)
     throws IOException {
   AssertionUtil.assertNotNull("context", context);
   AssertionUtil.assertNotNull("child", component);
   if (component.getChildCount() > 0) {
     for (Iterator it = component.getChildren().iterator(); it.hasNext(); ) {
       UIComponent child = (UIComponent) it.next();
       renderChild(context, child);
     }
   }
 }
示例#2
0
 public static void renderChild(FacesContext context, UIComponent child) throws IOException {
   AssertionUtil.assertNotNull("context", context);
   AssertionUtil.assertNotNull("child", child);
   if (!child.isRendered()) {
     return;
   }
   child.encodeBegin(context);
   if (child.getRendersChildren()) {
     child.encodeChildren(context);
   } else {
     renderChildren(context, child);
   }
   child.encodeEnd(context);
 }