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.el.MethodExpression; |
26 | |
import javax.faces.el.MethodBinding; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class HtmlCommandLink extends javax.faces.component.UICommand |
34 | |
implements javax.faces.component.behavior.ClientBehaviorHolder |
35 | |
{ |
36 | |
|
37 | |
static public final String COMPONENT_FAMILY = |
38 | |
"javax.faces.Command"; |
39 | |
static public final String COMPONENT_TYPE = |
40 | |
"javax.faces.HtmlCommandLink"; |
41 | |
|
42 | |
|
43 | |
public HtmlCommandLink() |
44 | 0 | { |
45 | 0 | setRendererType("javax.faces.Link"); |
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 | |
, "action" |
71 | |
)); |
72 | |
|
73 | |
public java.util.Collection<String> getEventNames() |
74 | |
{ |
75 | 0 | return CLIENT_EVENTS_LIST; |
76 | |
} |
77 | |
|
78 | |
@Override |
79 | |
public void addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior) |
80 | |
{ |
81 | 0 | super.addClientBehavior(eventName, behavior); |
82 | 0 | _CommonEventConstants.markEvent(this, eventName); |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
public String getDefaultEventName() |
87 | |
{ |
88 | 0 | return "action"; |
89 | |
} |
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
public boolean isDisabled() |
95 | |
{ |
96 | 0 | return (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); |
97 | |
} |
98 | |
|
99 | |
public void setDisabled(boolean disabled) |
100 | |
{ |
101 | 0 | getStateHelper().put(PropertyKeys.disabled, disabled ); |
102 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.DISABLED_PROP); |
103 | 0 | } |
104 | |
|
105 | |
|
106 | |
public String getStyle() |
107 | |
{ |
108 | 0 | return (String) getStateHelper().eval(PropertyKeys.style); |
109 | |
} |
110 | |
|
111 | |
public void setStyle(String style) |
112 | |
{ |
113 | 0 | getStateHelper().put(PropertyKeys.style, style ); |
114 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLE_PROP); |
115 | 0 | } |
116 | |
|
117 | |
|
118 | |
public String getStyleClass() |
119 | |
{ |
120 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
121 | |
} |
122 | |
|
123 | |
public void setStyleClass(String styleClass) |
124 | |
{ |
125 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
126 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLECLASS_PROP); |
127 | 0 | } |
128 | |
|
129 | |
|
130 | |
public String getTabindex() |
131 | |
{ |
132 | 0 | return (String) getStateHelper().eval(PropertyKeys.tabindex); |
133 | |
} |
134 | |
|
135 | |
public void setTabindex(String tabindex) |
136 | |
{ |
137 | 0 | getStateHelper().put(PropertyKeys.tabindex, tabindex ); |
138 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TABINDEX_PROP); |
139 | 0 | } |
140 | |
|
141 | |
|
142 | |
public String getOnblur() |
143 | |
{ |
144 | 0 | return (String) getStateHelper().eval(PropertyKeys.onblur); |
145 | |
} |
146 | |
|
147 | |
public void setOnblur(String onblur) |
148 | |
{ |
149 | 0 | getStateHelper().put(PropertyKeys.onblur, onblur ); |
150 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONBLUR_PROP); |
151 | 0 | } |
152 | |
|
153 | |
|
154 | |
public String getOnfocus() |
155 | |
{ |
156 | 0 | return (String) getStateHelper().eval(PropertyKeys.onfocus); |
157 | |
} |
158 | |
|
159 | |
public void setOnfocus(String onfocus) |
160 | |
{ |
161 | 0 | getStateHelper().put(PropertyKeys.onfocus, onfocus ); |
162 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONFOCUS_PROP); |
163 | 0 | } |
164 | |
|
165 | |
|
166 | |
public String getAccesskey() |
167 | |
{ |
168 | 0 | return (String) getStateHelper().eval(PropertyKeys.accesskey); |
169 | |
} |
170 | |
|
171 | |
public void setAccesskey(String accesskey) |
172 | |
{ |
173 | 0 | getStateHelper().put(PropertyKeys.accesskey, accesskey ); |
174 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ACCESSKEY_PROP); |
175 | 0 | } |
176 | |
|
177 | |
|
178 | |
public String getRole() |
179 | |
{ |
180 | 0 | return (String) getStateHelper().eval(PropertyKeys.role); |
181 | |
} |
182 | |
|
183 | |
public void setRole(String role) |
184 | |
{ |
185 | 0 | getStateHelper().put(PropertyKeys.role, role ); |
186 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ROLE_PROP); |
187 | 0 | } |
188 | |
|
189 | |
|
190 | |
public String getOnclick() |
191 | |
{ |
192 | 0 | return (String) getStateHelper().eval(PropertyKeys.onclick); |
193 | |
} |
194 | |
|
195 | |
public void setOnclick(String onclick) |
196 | |
{ |
197 | 0 | getStateHelper().put(PropertyKeys.onclick, onclick ); |
198 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCLICK_PROP); |
199 | 0 | } |
200 | |
|
201 | |
|
202 | |
public String getOndblclick() |
203 | |
{ |
204 | 0 | return (String) getStateHelper().eval(PropertyKeys.ondblclick); |
205 | |
} |
206 | |
|
207 | |
public void setOndblclick(String ondblclick) |
208 | |
{ |
209 | 0 | getStateHelper().put(PropertyKeys.ondblclick, ondblclick ); |
210 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONDBLCLICK_PROP); |
211 | 0 | } |
212 | |
|
213 | |
|
214 | |
public String getOnkeydown() |
215 | |
{ |
216 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeydown); |
217 | |
} |
218 | |
|
219 | |
public void setOnkeydown(String onkeydown) |
220 | |
{ |
221 | 0 | getStateHelper().put(PropertyKeys.onkeydown, onkeydown ); |
222 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYDOWN_PROP); |
223 | 0 | } |
224 | |
|
225 | |
|
226 | |
public String getOnkeypress() |
227 | |
{ |
228 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeypress); |
229 | |
} |
230 | |
|
231 | |
public void setOnkeypress(String onkeypress) |
232 | |
{ |
233 | 0 | getStateHelper().put(PropertyKeys.onkeypress, onkeypress ); |
234 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYPRESS_PROP); |
235 | 0 | } |
236 | |
|
237 | |
|
238 | |
public String getOnkeyup() |
239 | |
{ |
240 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeyup); |
241 | |
} |
242 | |
|
243 | |
public void setOnkeyup(String onkeyup) |
244 | |
{ |
245 | 0 | getStateHelper().put(PropertyKeys.onkeyup, onkeyup ); |
246 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYUP_PROP); |
247 | 0 | } |
248 | |
|
249 | |
|
250 | |
public String getOnmousedown() |
251 | |
{ |
252 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousedown); |
253 | |
} |
254 | |
|
255 | |
public void setOnmousedown(String onmousedown) |
256 | |
{ |
257 | 0 | getStateHelper().put(PropertyKeys.onmousedown, onmousedown ); |
258 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEDOWN_PROP); |
259 | 0 | } |
260 | |
|
261 | |
|
262 | |
public String getOnmousemove() |
263 | |
{ |
264 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousemove); |
265 | |
} |
266 | |
|
267 | |
public void setOnmousemove(String onmousemove) |
268 | |
{ |
269 | 0 | getStateHelper().put(PropertyKeys.onmousemove, onmousemove ); |
270 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEMOVE_PROP); |
271 | 0 | } |
272 | |
|
273 | |
|
274 | |
public String getOnmouseout() |
275 | |
{ |
276 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseout); |
277 | |
} |
278 | |
|
279 | |
public void setOnmouseout(String onmouseout) |
280 | |
{ |
281 | 0 | getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); |
282 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOUT_PROP); |
283 | 0 | } |
284 | |
|
285 | |
|
286 | |
public String getOnmouseover() |
287 | |
{ |
288 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseover); |
289 | |
} |
290 | |
|
291 | |
public void setOnmouseover(String onmouseover) |
292 | |
{ |
293 | 0 | getStateHelper().put(PropertyKeys.onmouseover, onmouseover ); |
294 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOVER_PROP); |
295 | 0 | } |
296 | |
|
297 | |
|
298 | |
public String getOnmouseup() |
299 | |
{ |
300 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseup); |
301 | |
} |
302 | |
|
303 | |
public void setOnmouseup(String onmouseup) |
304 | |
{ |
305 | 0 | getStateHelper().put(PropertyKeys.onmouseup, onmouseup ); |
306 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEUP_PROP); |
307 | 0 | } |
308 | |
|
309 | |
|
310 | |
public String getDir() |
311 | |
{ |
312 | 0 | return (String) getStateHelper().eval(PropertyKeys.dir); |
313 | |
} |
314 | |
|
315 | |
public void setDir(String dir) |
316 | |
{ |
317 | 0 | getStateHelper().put(PropertyKeys.dir, dir ); |
318 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.DIR_PROP); |
319 | 0 | } |
320 | |
|
321 | |
|
322 | |
public String getLang() |
323 | |
{ |
324 | 0 | return (String) getStateHelper().eval(PropertyKeys.lang); |
325 | |
} |
326 | |
|
327 | |
public void setLang(String lang) |
328 | |
{ |
329 | 0 | getStateHelper().put(PropertyKeys.lang, lang ); |
330 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.LANG_PROP); |
331 | 0 | } |
332 | |
|
333 | |
|
334 | |
public String getTitle() |
335 | |
{ |
336 | 0 | return (String) getStateHelper().eval(PropertyKeys.title); |
337 | |
} |
338 | |
|
339 | |
public void setTitle(String title) |
340 | |
{ |
341 | 0 | getStateHelper().put(PropertyKeys.title, title ); |
342 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TITLE_PROP); |
343 | 0 | } |
344 | |
|
345 | |
|
346 | |
public String getCharset() |
347 | |
{ |
348 | 0 | return (String) getStateHelper().eval(PropertyKeys.charset); |
349 | |
} |
350 | |
|
351 | |
public void setCharset(String charset) |
352 | |
{ |
353 | 0 | getStateHelper().put(PropertyKeys.charset, charset ); |
354 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.CHARSET_PROP); |
355 | 0 | } |
356 | |
|
357 | |
|
358 | |
public String getCoords() |
359 | |
{ |
360 | 0 | return (String) getStateHelper().eval(PropertyKeys.coords); |
361 | |
} |
362 | |
|
363 | |
public void setCoords(String coords) |
364 | |
{ |
365 | 0 | getStateHelper().put(PropertyKeys.coords, coords ); |
366 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.COORDS_PROP); |
367 | 0 | } |
368 | |
|
369 | |
|
370 | |
public String getHreflang() |
371 | |
{ |
372 | 0 | return (String) getStateHelper().eval(PropertyKeys.hreflang); |
373 | |
} |
374 | |
|
375 | |
public void setHreflang(String hreflang) |
376 | |
{ |
377 | 0 | getStateHelper().put(PropertyKeys.hreflang, hreflang ); |
378 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.HREFLANG_PROP); |
379 | 0 | } |
380 | |
|
381 | |
|
382 | |
public String getRel() |
383 | |
{ |
384 | 0 | return (String) getStateHelper().eval(PropertyKeys.rel); |
385 | |
} |
386 | |
|
387 | |
public void setRel(String rel) |
388 | |
{ |
389 | 0 | getStateHelper().put(PropertyKeys.rel, rel ); |
390 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.REL_PROP); |
391 | 0 | } |
392 | |
|
393 | |
|
394 | |
public String getRev() |
395 | |
{ |
396 | 0 | return (String) getStateHelper().eval(PropertyKeys.rev); |
397 | |
} |
398 | |
|
399 | |
public void setRev(String rev) |
400 | |
{ |
401 | 0 | getStateHelper().put(PropertyKeys.rev, rev ); |
402 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.REV_PROP); |
403 | 0 | } |
404 | |
|
405 | |
|
406 | |
public String getShape() |
407 | |
{ |
408 | 0 | return (String) getStateHelper().eval(PropertyKeys.shape); |
409 | |
} |
410 | |
|
411 | |
public void setShape(String shape) |
412 | |
{ |
413 | 0 | getStateHelper().put(PropertyKeys.shape, shape ); |
414 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.SHAPE_PROP); |
415 | 0 | } |
416 | |
|
417 | |
|
418 | |
public String getTarget() |
419 | |
{ |
420 | 0 | return (String) getStateHelper().eval(PropertyKeys.target); |
421 | |
} |
422 | |
|
423 | |
public void setTarget(String target) |
424 | |
{ |
425 | 0 | getStateHelper().put(PropertyKeys.target, target ); |
426 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TARGET_PROP); |
427 | 0 | } |
428 | |
|
429 | |
|
430 | |
public String getType() |
431 | |
{ |
432 | 0 | return (String) getStateHelper().eval(PropertyKeys.type); |
433 | |
} |
434 | |
|
435 | |
public void setType(String type) |
436 | |
{ |
437 | 0 | getStateHelper().put(PropertyKeys.type, type ); |
438 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TYPE_PROP); |
439 | 0 | } |
440 | |
|
441 | |
public void setValueBinding(String name, ValueBinding binding) |
442 | |
{ |
443 | 0 | super.setValueBinding(name, binding); |
444 | 0 | _CommonPropertyConstants.markProperty(this, name); |
445 | 0 | } |
446 | |
|
447 | |
public void setValueExpression(String name, ValueExpression expression) |
448 | |
{ |
449 | 0 | super.setValueExpression(name, expression); |
450 | 0 | _CommonPropertyConstants.markProperty(this, name); |
451 | 0 | } |
452 | |
|
453 | 0 | protected enum PropertyKeys |
454 | |
{ |
455 | 0 | disabled |
456 | 0 | , style |
457 | 0 | , styleClass |
458 | 0 | , tabindex |
459 | 0 | , onblur |
460 | 0 | , onfocus |
461 | 0 | , accesskey |
462 | 0 | , role |
463 | 0 | , onclick |
464 | 0 | , ondblclick |
465 | 0 | , onkeydown |
466 | 0 | , onkeypress |
467 | 0 | , onkeyup |
468 | 0 | , onmousedown |
469 | 0 | , onmousemove |
470 | 0 | , onmouseout |
471 | 0 | , onmouseover |
472 | 0 | , onmouseup |
473 | 0 | , dir |
474 | 0 | , lang |
475 | 0 | , title |
476 | 0 | , charset |
477 | 0 | , coords |
478 | 0 | , hreflang |
479 | 0 | , rel |
480 | 0 | , rev |
481 | 0 | , shape |
482 | 0 | , target |
483 | 0 | , type |
484 | |
} |
485 | |
|
486 | |
} |