KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > renderkit > html > HtmlRenderer


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.renderkit.html;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21 import javax.faces.component.UIComponent;
22 import javax.faces.context.FacesContext;
23 import javax.faces.render.Renderer;
24 import java.io.IOException JavaDoc;
25
26
27 /**
28  * $Log: HtmlRenderer.java,v $
29  * Revision 1.4 2004/10/13 11:51:01 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.3 2004/07/01 22:00:57 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.2 2004/06/23 13:44:21 royalts
36  * no message
37  *
38  * Revision 1.1 2004/03/29 14:57:00 manolito
39  * refactoring for implementation and non-standard component split
40  *
41  * @author Manfred Geiler (latest modification by $Author: matze $)
42  * @version $Revision: 1.4 $ $Date: 2004/10/13 11:51:01 $
43  */

44 public abstract class HtmlRenderer
45         extends Renderer
46 {
47     private static final Log log = LogFactory.getLog(HtmlRenderer.class);
48
49     public void encodeChildren(FacesContext context, UIComponent component)
50             throws IOException JavaDoc
51     {
52         if (log.isWarnEnabled())
53         {
54             if (getRendersChildren())
55             {
56                 log.warn("Renderer " + getClass().getName() + " renders its children and should therefore implement encodeChildren.");
57             }
58             else
59             {
60                 log.warn("Renderer " + getClass().getName() + " does not render its children. Method encodeChildren should not be called.");
61             }
62         }
63     }
64 }
65
Popular Tags