KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > faces > core > renderer > html > ChildrenRenderer


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.faces.core.renderer.html;
6
7 import java.util.* ;
8 import java.io.IOException JavaDoc;
9 import javax.faces.component.UIComponent;
10 import javax.faces.context.FacesContext;
11 import javax.faces.render.Renderer ;
12 /**
13  * @email: tuan08@users.sourceforge.net
14  * @version: $Id: ChildrenRenderer.java,v 1.1 2004/06/03 22:51:36 tuan08 Exp $
15  */

16 public class ChildrenRenderer extends Renderer {
17
18   final public void encodeBegin( FacesContext context, UIComponent component ) throws IOException JavaDoc {
19   }
20
21   public void encodeChildren( FacesContext context, UIComponent component ) throws IOException JavaDoc {
22     List children = component.getChildren() ;
23     for (int i = 0; i < children.size(); i++) {
24       UIComponent child = (UIComponent) children.get(i) ;
25       if (child.isRendered()) {
26         child.encodeBegin(context) ;
27         child.encodeChildren(context) ;
28         child.encodeEnd(context) ;
29       }
30     }
31   }
32
33   final public void encodeEnd( FacesContext context, UIComponent component ) throws IOException JavaDoc {
34   }
35 }
Popular Tags