1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package javax.faces.render;
20
21 import java.io.IOException;
22
23 import javax.faces.component.UIComponent;
24 import javax.faces.context.FacesContext;
25 import javax.faces.convert.ConverterException;
26
27
28
29
30
31
32
33 public abstract class Renderer
34 {
35 public void decode(FacesContext context, UIComponent component)
36 {
37 if (context == null)
38 {
39 throw new NullPointerException("context");
40 }
41 if (component == null)
42 {
43 throw new NullPointerException("component");
44 }
45 }
46
47
48
49
50 public void encodeBegin(FacesContext context, UIComponent component) throws IOException
51 {
52 if (context == null)
53 {
54 throw new NullPointerException("context");
55 }
56 if (component == null)
57 {
58 throw new NullPointerException("component");
59 }
60 }
61
62
63
64
65
66
67
68
69
70
71
72 public void encodeChildren(FacesContext context, UIComponent component) throws IOException
73 {
74 if (context == null)
75 {
76 throw new NullPointerException("context");
77 }
78 if (component == null)
79 {
80 throw new NullPointerException("component");
81 }
82
83 if (component.getChildCount() > 0)
84 {
85 for (int i = 0, childCount = component.getChildCount(); i < childCount; i++)
86 {
87 UIComponent child = component.getChildren().get(i);
88 if (!child.isRendered())
89 {
90 continue;
91 }
92
93 child.encodeAll(context);
94 }
95 }
96 }
97
98
99
100
101 public void encodeEnd(FacesContext context, UIComponent component) throws IOException
102 {
103 if (context == null)
104 {
105 throw new NullPointerException("context");
106 }
107 if (component == null)
108 {
109 throw new NullPointerException("component");
110 }
111 }
112
113 public String convertClientId(FacesContext context, String clientId)
114 {
115 if (context == null)
116 {
117 throw new NullPointerException("context");
118 }
119 if (clientId == null)
120 {
121 throw new NullPointerException("clientId");
122 }
123 return clientId;
124 }
125
126
127
128
129
130
131
132
133
134
135
136 public boolean getRendersChildren()
137 {
138 return false;
139 }
140
141 public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue)
142 throws ConverterException
143 {
144 if (context == null)
145 {
146 throw new NullPointerException("context");
147 }
148 if (component == null)
149 {
150 throw new NullPointerException("component");
151 }
152 return submittedValue;
153 }
154
155 }