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