KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > wap > renderkit > wml > GroupRenderer


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.wap.renderkit.wml;
17
18 import javax.faces.component.UIComponent;
19 import javax.faces.context.FacesContext;
20
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23 import org.apache.myfaces.wap.renderkit.RendererUtils;
24 import org.apache.myfaces.wap.renderkit.WmlRenderer;
25
26
27 /**
28  * @author <a HREF="mailto:Jiri.Zaloudek@ivancice.cz">Jiri Zaloudek</a> (latest modification by $Author: matzew $)
29  * @version $Revision: 1.1 $ $Date: 2004/12/30 09:37:26 $
30  * $Log: GroupRenderer.java,v $
31  * Revision 1.1 2004/12/30 09:37:26 matzew
32  * added a new RenderKit for WML. Thanks to Jirí Žaloudek
33  *
34  */

35 public class GroupRenderer extends WmlRenderer {
36     private static Log log = LogFactory.getLog(GroupRenderer.class);
37     
38     /** Creates a new instance of GroupRenderer */
39     public GroupRenderer() {
40         super();
41         log.debug("created object " + this.getClass().getName());
42     }
43     
44     public boolean getRendersChildren(){
45         return(true);
46     }
47     
48     public void encodeBegin(FacesContext context, UIComponent component) throws java.io.IOException JavaDoc {
49         log.debug("encodeBegin(" + component.getId() + ")");
50         
51         if (context == null || component == null) {
52             throw new NullPointerException JavaDoc();
53         }
54         if (!component.isRendered()) return;
55         // renderen in method encodeEnd
56
}
57     
58     public void encodeChildren(FacesContext context, UIComponent component) throws java.io.IOException JavaDoc {
59         log.debug("encodeChildren(" + component.getId() + ")");
60         if (context == null || component == null) {
61             throw new NullPointerException JavaDoc();
62         }
63         if (!component.isRendered()) return;
64         
65         // renderen in method encodeEnd
66
}
67     
68     public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException JavaDoc {
69         log.debug("encodeEnd(" + component.getId() + ")");
70         if (context == null || component == null) {
71             throw new NullPointerException JavaDoc();
72         }
73         if (!component.isRendered()) return;
74         
75         RendererUtils.renderChildren(context, component);
76     }
77     
78     public void decode(FacesContext context, UIComponent component) {
79         if (component == null ) throw new NullPointerException JavaDoc();
80     }
81 }
82
83
Popular Tags