KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > content > explorer > renderer > html > ContentEditorRenderer


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.portlets.content.explorer.renderer.html;
6
7 import java.util.Iterator JavaDoc ;
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 JavaDoc;
13
14 /**
15  * @email: tuan08@users.sourceforge.net
16  * @version: $Id: ContentEditorRenderer.java,v 1.1 2004/07/16 09:51:34 oranheim Exp $
17  */

18 public class ContentEditorRenderer extends HtmlBasicRenderer {
19   
20   final public void encodeChildren( FacesContext context, UIComponent component ) throws IOException JavaDoc {
21     ResponseWriter w = context.getResponseWriter() ;
22     w.write("<center>");
23     Iterator JavaDoc 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