1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package javax.faces.component.html; |
20 | |
|
21 | |
import javax.faces.el.ValueBinding; |
22 | |
import javax.el.ValueExpression; |
23 | |
import javax.faces.context.FacesContext; |
24 | |
import javax.faces.component.UIComponent; |
25 | |
import javax.faces.convert.Converter; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
public class HtmlOutputLabel extends javax.faces.component.UIOutput |
33 | |
implements javax.faces.component.behavior.ClientBehaviorHolder |
34 | |
{ |
35 | |
|
36 | |
static public final String COMPONENT_FAMILY = |
37 | |
"javax.faces.Output"; |
38 | |
static public final String COMPONENT_TYPE = |
39 | |
"javax.faces.HtmlOutputLabel"; |
40 | |
|
41 | |
|
42 | |
public HtmlOutputLabel() |
43 | 0 | { |
44 | 0 | setRendererType("javax.faces.Label"); |
45 | 0 | } |
46 | |
|
47 | |
@Override |
48 | |
public String getFamily() |
49 | |
{ |
50 | 0 | return COMPONENT_FAMILY; |
51 | |
} |
52 | |
|
53 | |
|
54 | 0 | static private final java.util.Collection<String> CLIENT_EVENTS_LIST = |
55 | |
java.util.Collections.unmodifiableCollection( |
56 | |
java.util.Arrays.asList( |
57 | |
"blur" |
58 | |
, "focus" |
59 | |
, "click" |
60 | |
, "dblclick" |
61 | |
, "keydown" |
62 | |
, "keypress" |
63 | |
, "keyup" |
64 | |
, "mousedown" |
65 | |
, "mousemove" |
66 | |
, "mouseout" |
67 | |
, "mouseover" |
68 | |
, "mouseup" |
69 | |
)); |
70 | |
|
71 | |
public java.util.Collection<String> getEventNames() |
72 | |
{ |
73 | 0 | return CLIENT_EVENTS_LIST; |
74 | |
} |
75 | |
|
76 | |
@Override |
77 | |
public void addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior) |
78 | |
{ |
79 | 0 | super.addClientBehavior(eventName, behavior); |
80 | 0 | _CommonEventConstants.markEvent(this, eventName); |
81 | 0 | } |
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
public String getFor() |
87 | |
{ |
88 | 0 | return (String) getStateHelper().eval(PropertyKeys.forVal); |
89 | |
} |
90 | |
|
91 | |
public void setFor(String forParam) |
92 | |
{ |
93 | 0 | getStateHelper().put(PropertyKeys.forVal, forParam ); |
94 | 0 | } |
95 | |
|
96 | |
|
97 | |
public String getStyle() |
98 | |
{ |
99 | 0 | return (String) getStateHelper().eval(PropertyKeys.style); |
100 | |
} |
101 | |
|
102 | |
public void setStyle(String style) |
103 | |
{ |
104 | 0 | getStateHelper().put(PropertyKeys.style, style ); |
105 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLE_PROP); |
106 | 0 | } |
107 | |
|
108 | |
|
109 | |
public String getStyleClass() |
110 | |
{ |
111 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
112 | |
} |
113 | |
|
114 | |
public void setStyleClass(String styleClass) |
115 | |
{ |
116 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
117 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLECLASS_PROP); |
118 | 0 | } |
119 | |
|
120 | |
|
121 | |
public boolean isEscape() |
122 | |
{ |
123 | 0 | return (Boolean) getStateHelper().eval(PropertyKeys.escape, true); |
124 | |
} |
125 | |
|
126 | |
public void setEscape(boolean escape) |
127 | |
{ |
128 | 0 | getStateHelper().put(PropertyKeys.escape, escape ); |
129 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ESCAPE_PROP); |
130 | 0 | } |
131 | |
|
132 | |
|
133 | |
public String getTabindex() |
134 | |
{ |
135 | 0 | return (String) getStateHelper().eval(PropertyKeys.tabindex); |
136 | |
} |
137 | |
|
138 | |
public void setTabindex(String tabindex) |
139 | |
{ |
140 | 0 | getStateHelper().put(PropertyKeys.tabindex, tabindex ); |
141 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TABINDEX_PROP); |
142 | 0 | } |
143 | |
|
144 | |
|
145 | |
public String getOnblur() |
146 | |
{ |
147 | 0 | return (String) getStateHelper().eval(PropertyKeys.onblur); |
148 | |
} |
149 | |
|
150 | |
public void setOnblur(String onblur) |
151 | |
{ |
152 | 0 | getStateHelper().put(PropertyKeys.onblur, onblur ); |
153 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONBLUR_PROP); |
154 | 0 | } |
155 | |
|
156 | |
|
157 | |
public String getOnfocus() |
158 | |
{ |
159 | 0 | return (String) getStateHelper().eval(PropertyKeys.onfocus); |
160 | |
} |
161 | |
|
162 | |
public void setOnfocus(String onfocus) |
163 | |
{ |
164 | 0 | getStateHelper().put(PropertyKeys.onfocus, onfocus ); |
165 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONFOCUS_PROP); |
166 | 0 | } |
167 | |
|
168 | |
|
169 | |
public String getAccesskey() |
170 | |
{ |
171 | 0 | return (String) getStateHelper().eval(PropertyKeys.accesskey); |
172 | |
} |
173 | |
|
174 | |
public void setAccesskey(String accesskey) |
175 | |
{ |
176 | 0 | getStateHelper().put(PropertyKeys.accesskey, accesskey ); |
177 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ACCESSKEY_PROP); |
178 | 0 | } |
179 | |
|
180 | |
|
181 | |
public String getRole() |
182 | |
{ |
183 | 0 | return (String) getStateHelper().eval(PropertyKeys.role); |
184 | |
} |
185 | |
|
186 | |
public void setRole(String role) |
187 | |
{ |
188 | 0 | getStateHelper().put(PropertyKeys.role, role ); |
189 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ROLE_PROP); |
190 | 0 | } |
191 | |
|
192 | |
|
193 | |
public String getOnclick() |
194 | |
{ |
195 | 0 | return (String) getStateHelper().eval(PropertyKeys.onclick); |
196 | |
} |
197 | |
|
198 | |
public void setOnclick(String onclick) |
199 | |
{ |
200 | 0 | getStateHelper().put(PropertyKeys.onclick, onclick ); |
201 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCLICK_PROP); |
202 | 0 | } |
203 | |
|
204 | |
|
205 | |
public String getOndblclick() |
206 | |
{ |
207 | 0 | return (String) getStateHelper().eval(PropertyKeys.ondblclick); |
208 | |
} |
209 | |
|
210 | |
public void setOndblclick(String ondblclick) |
211 | |
{ |
212 | 0 | getStateHelper().put(PropertyKeys.ondblclick, ondblclick ); |
213 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONDBLCLICK_PROP); |
214 | 0 | } |
215 | |
|
216 | |
|
217 | |
public String getOnkeydown() |
218 | |
{ |
219 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeydown); |
220 | |
} |
221 | |
|
222 | |
public void setOnkeydown(String onkeydown) |
223 | |
{ |
224 | 0 | getStateHelper().put(PropertyKeys.onkeydown, onkeydown ); |
225 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYDOWN_PROP); |
226 | 0 | } |
227 | |
|
228 | |
|
229 | |
public String getOnkeypress() |
230 | |
{ |
231 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeypress); |
232 | |
} |
233 | |
|
234 | |
public void setOnkeypress(String onkeypress) |
235 | |
{ |
236 | 0 | getStateHelper().put(PropertyKeys.onkeypress, onkeypress ); |
237 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYPRESS_PROP); |
238 | 0 | } |
239 | |
|
240 | |
|
241 | |
public String getOnkeyup() |
242 | |
{ |
243 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeyup); |
244 | |
} |
245 | |
|
246 | |
public void setOnkeyup(String onkeyup) |
247 | |
{ |
248 | 0 | getStateHelper().put(PropertyKeys.onkeyup, onkeyup ); |
249 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYUP_PROP); |
250 | 0 | } |
251 | |
|
252 | |
|
253 | |
public String getOnmousedown() |
254 | |
{ |
255 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousedown); |
256 | |
} |
257 | |
|
258 | |
public void setOnmousedown(String onmousedown) |
259 | |
{ |
260 | 0 | getStateHelper().put(PropertyKeys.onmousedown, onmousedown ); |
261 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEDOWN_PROP); |
262 | 0 | } |
263 | |
|
264 | |
|
265 | |
public String getOnmousemove() |
266 | |
{ |
267 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousemove); |
268 | |
} |
269 | |
|
270 | |
public void setOnmousemove(String onmousemove) |
271 | |
{ |
272 | 0 | getStateHelper().put(PropertyKeys.onmousemove, onmousemove ); |
273 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEMOVE_PROP); |
274 | 0 | } |
275 | |
|
276 | |
|
277 | |
public String getOnmouseout() |
278 | |
{ |
279 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseout); |
280 | |
} |
281 | |
|
282 | |
public void setOnmouseout(String onmouseout) |
283 | |
{ |
284 | 0 | getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); |
285 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOUT_PROP); |
286 | 0 | } |
287 | |
|
288 | |
|
289 | |
public String getOnmouseover() |
290 | |
{ |
291 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseover); |
292 | |
} |
293 | |
|
294 | |
public void setOnmouseover(String onmouseover) |
295 | |
{ |
296 | 0 | getStateHelper().put(PropertyKeys.onmouseover, onmouseover ); |
297 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOVER_PROP); |
298 | 0 | } |
299 | |
|
300 | |
|
301 | |
public String getOnmouseup() |
302 | |
{ |
303 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseup); |
304 | |
} |
305 | |
|
306 | |
public void setOnmouseup(String onmouseup) |
307 | |
{ |
308 | 0 | getStateHelper().put(PropertyKeys.onmouseup, onmouseup ); |
309 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEUP_PROP); |
310 | 0 | } |
311 | |
|
312 | |
|
313 | |
public String getDir() |
314 | |
{ |
315 | 0 | return (String) getStateHelper().eval(PropertyKeys.dir); |
316 | |
} |
317 | |
|
318 | |
public void setDir(String dir) |
319 | |
{ |
320 | 0 | getStateHelper().put(PropertyKeys.dir, dir ); |
321 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.DIR_PROP); |
322 | 0 | } |
323 | |
|
324 | |
|
325 | |
public String getLang() |
326 | |
{ |
327 | 0 | return (String) getStateHelper().eval(PropertyKeys.lang); |
328 | |
} |
329 | |
|
330 | |
public void setLang(String lang) |
331 | |
{ |
332 | 0 | getStateHelper().put(PropertyKeys.lang, lang ); |
333 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.LANG_PROP); |
334 | 0 | } |
335 | |
|
336 | |
|
337 | |
public String getTitle() |
338 | |
{ |
339 | 0 | return (String) getStateHelper().eval(PropertyKeys.title); |
340 | |
} |
341 | |
|
342 | |
public void setTitle(String title) |
343 | |
{ |
344 | 0 | getStateHelper().put(PropertyKeys.title, title ); |
345 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TITLE_PROP); |
346 | 0 | } |
347 | |
|
348 | |
public void setValueBinding(String name, ValueBinding binding) |
349 | |
{ |
350 | 0 | super.setValueBinding(name, binding); |
351 | 0 | _CommonPropertyConstants.markProperty(this, name); |
352 | 0 | } |
353 | |
|
354 | |
public void setValueExpression(String name, ValueExpression expression) |
355 | |
{ |
356 | 0 | super.setValueExpression(name, expression); |
357 | 0 | _CommonPropertyConstants.markProperty(this, name); |
358 | 0 | } |
359 | |
|
360 | 0 | protected enum PropertyKeys |
361 | |
{ |
362 | 0 | forVal("for") |
363 | 0 | , style |
364 | 0 | , styleClass |
365 | 0 | , escape |
366 | 0 | , tabindex |
367 | 0 | , onblur |
368 | 0 | , onfocus |
369 | 0 | , accesskey |
370 | 0 | , role |
371 | 0 | , onclick |
372 | 0 | , ondblclick |
373 | 0 | , onkeydown |
374 | 0 | , onkeypress |
375 | 0 | , onkeyup |
376 | 0 | , onmousedown |
377 | 0 | , onmousemove |
378 | 0 | , onmouseout |
379 | 0 | , onmouseover |
380 | 0 | , onmouseup |
381 | 0 | , dir |
382 | 0 | , lang |
383 | 0 | , title |
384 | |
; |
385 | |
String c; |
386 | |
|
387 | |
PropertyKeys() |
388 | 0 | { |
389 | 0 | } |
390 | |
|
391 | |
|
392 | |
PropertyKeys(String c) |
393 | 0 | { |
394 | 0 | this.c = c; |
395 | 0 | } |
396 | |
|
397 | |
public String toString() |
398 | |
{ |
399 | 0 | return ((this.c != null) ? this.c : super.toString()); |
400 | |
} |
401 | |
} |
402 | |
|
403 | |
} |