1 5 package org.exoplatform.commons.debug; 6 7 import java.util.* ; 8 import java.io.PrintStream ; 9 10 import javax.faces.component.UIComponent ; 11 12 16 public class FacesHelper { 17 18 static public void printUIComponentInfo(PrintStream out, UIComponent component) { 19 } 20 21 static public void printTreeInfo(PrintStream out, UIComponent component) { 22 printTreeInfo(out,component, "") ; 23 24 } 25 26 static private void printTreeInfo(PrintStream out, UIComponent component, String indent) { 27 out.print(indent) ; 28 out.print("[class:" + component.getClass().getName() +"]"); 29 out.print("[hash code:" + component.hashCode() +"]\n" ); 30 List children = component.getChildren() ; 31 for (int i = 0; i < children.size(); i++) { 32 UIComponent child = (UIComponent) children.get(i) ; 33 printTreeInfo(out, child , indent + " ") ; 34 } 35 } 36 } 37 | Popular Tags |