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