1 5 package org.exoplatform.portlets.content.explorer.renderer.html; 6 7 import java.util.Iterator ; 8 import javax.faces.component.UIComponent; 9 import javax.faces.context.FacesContext; 10 import javax.faces.context.ResponseWriter; 11 import org.exoplatform.faces.core.renderer.html.HtmlBasicRenderer; 12 import java.io.IOException ; 13 14 18 public class ContentEditorRenderer extends HtmlBasicRenderer { 19 20 final public void encodeChildren( FacesContext context, UIComponent component ) throws IOException { 21 ResponseWriter w = context.getResponseWriter() ; 22 w.write("<center>"); 23 Iterator i = component.getFacets().values().iterator() ; 24 while (i.hasNext()) { 25 UIComponent child = (UIComponent) i.next() ; 26 if (child.isRendered()) { 27 child.encodeBegin(context) ; 28 child.encodeChildren(context) ; 29 child.encodeEnd(context) ; 30 } 31 } 32 w.write("</center>"); 33 } 34 } 35 | Popular Tags |