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.el.ValueExpression; |
22 | |
import javax.faces.context.FacesContext; |
23 | |
import javax.faces.component.UIComponent; |
24 | |
import javax.el.MethodExpression; |
25 | |
import javax.faces.el.MethodBinding; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
public class HtmlCommandLink extends javax.faces.component.UICommand |
33 | |
implements javax.faces.component.behavior.ClientBehaviorHolder |
34 | |
{ |
35 | |
|
36 | |
static public final String COMPONENT_FAMILY = |
37 | |
"javax.faces.Command"; |
38 | |
static public final String COMPONENT_TYPE = |
39 | |
"javax.faces.HtmlCommandLink"; |
40 | |
|
41 | |
|
42 | |
public HtmlCommandLink() |
43 | 0 | { |
44 | 0 | setRendererType("javax.faces.Link"); |
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 | |
, "action" |
70 | |
)); |
71 | |
|
72 | |
public java.util.Collection<String> getEventNames() |
73 | |
{ |
74 | 0 | return CLIENT_EVENTS_LIST; |
75 | |
} |
76 | |
|
77 | |
|
78 | |
public String getDefaultEventName() |
79 | |
{ |
80 | 0 | return "action"; |
81 | |
} |
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
public boolean isDisabled() |
87 | |
{ |
88 | 0 | return (Boolean) getStateHelper().eval(PropertyKeys.disabled, false); |
89 | |
} |
90 | |
|
91 | |
public void setDisabled(boolean disabled) |
92 | |
{ |
93 | 0 | getStateHelper().put(PropertyKeys.disabled, disabled ); |
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 | } |
106 | |
|
107 | |
|
108 | |
public String getStyleClass() |
109 | |
{ |
110 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
111 | |
} |
112 | |
|
113 | |
public void setStyleClass(String styleClass) |
114 | |
{ |
115 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
116 | 0 | } |
117 | |
|
118 | |
|
119 | |
public String getTabindex() |
120 | |
{ |
121 | 0 | return (String) getStateHelper().eval(PropertyKeys.tabindex); |
122 | |
} |
123 | |
|
124 | |
public void setTabindex(String tabindex) |
125 | |
{ |
126 | 0 | getStateHelper().put(PropertyKeys.tabindex, tabindex ); |
127 | 0 | } |
128 | |
|
129 | |
|
130 | |
public String getOnblur() |
131 | |
{ |
132 | 0 | return (String) getStateHelper().eval(PropertyKeys.onblur); |
133 | |
} |
134 | |
|
135 | |
public void setOnblur(String onblur) |
136 | |
{ |
137 | 0 | getStateHelper().put(PropertyKeys.onblur, onblur ); |
138 | 0 | } |
139 | |
|
140 | |
|
141 | |
public String getOnfocus() |
142 | |
{ |
143 | 0 | return (String) getStateHelper().eval(PropertyKeys.onfocus); |
144 | |
} |
145 | |
|
146 | |
public void setOnfocus(String onfocus) |
147 | |
{ |
148 | 0 | getStateHelper().put(PropertyKeys.onfocus, onfocus ); |
149 | 0 | } |
150 | |
|
151 | |
|
152 | |
public String getAccesskey() |
153 | |
{ |
154 | 0 | return (String) getStateHelper().eval(PropertyKeys.accesskey); |
155 | |
} |
156 | |
|
157 | |
public void setAccesskey(String accesskey) |
158 | |
{ |
159 | 0 | getStateHelper().put(PropertyKeys.accesskey, accesskey ); |
160 | 0 | } |
161 | |
|
162 | |
|
163 | |
public String getOnclick() |
164 | |
{ |
165 | 0 | return (String) getStateHelper().eval(PropertyKeys.onclick); |
166 | |
} |
167 | |
|
168 | |
public void setOnclick(String onclick) |
169 | |
{ |
170 | 0 | getStateHelper().put(PropertyKeys.onclick, onclick ); |
171 | 0 | } |
172 | |
|
173 | |
|
174 | |
public String getOndblclick() |
175 | |
{ |
176 | 0 | return (String) getStateHelper().eval(PropertyKeys.ondblclick); |
177 | |
} |
178 | |
|
179 | |
public void setOndblclick(String ondblclick) |
180 | |
{ |
181 | 0 | getStateHelper().put(PropertyKeys.ondblclick, ondblclick ); |
182 | 0 | } |
183 | |
|
184 | |
|
185 | |
public String getOnkeydown() |
186 | |
{ |
187 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeydown); |
188 | |
} |
189 | |
|
190 | |
public void setOnkeydown(String onkeydown) |
191 | |
{ |
192 | 0 | getStateHelper().put(PropertyKeys.onkeydown, onkeydown ); |
193 | 0 | } |
194 | |
|
195 | |
|
196 | |
public String getOnkeypress() |
197 | |
{ |
198 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeypress); |
199 | |
} |
200 | |
|
201 | |
public void setOnkeypress(String onkeypress) |
202 | |
{ |
203 | 0 | getStateHelper().put(PropertyKeys.onkeypress, onkeypress ); |
204 | 0 | } |
205 | |
|
206 | |
|
207 | |
public String getOnkeyup() |
208 | |
{ |
209 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeyup); |
210 | |
} |
211 | |
|
212 | |
public void setOnkeyup(String onkeyup) |
213 | |
{ |
214 | 0 | getStateHelper().put(PropertyKeys.onkeyup, onkeyup ); |
215 | 0 | } |
216 | |
|
217 | |
|
218 | |
public String getOnmousedown() |
219 | |
{ |
220 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousedown); |
221 | |
} |
222 | |
|
223 | |
public void setOnmousedown(String onmousedown) |
224 | |
{ |
225 | 0 | getStateHelper().put(PropertyKeys.onmousedown, onmousedown ); |
226 | 0 | } |
227 | |
|
228 | |
|
229 | |
public String getOnmousemove() |
230 | |
{ |
231 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousemove); |
232 | |
} |
233 | |
|
234 | |
public void setOnmousemove(String onmousemove) |
235 | |
{ |
236 | 0 | getStateHelper().put(PropertyKeys.onmousemove, onmousemove ); |
237 | 0 | } |
238 | |
|
239 | |
|
240 | |
public String getOnmouseout() |
241 | |
{ |
242 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseout); |
243 | |
} |
244 | |
|
245 | |
public void setOnmouseout(String onmouseout) |
246 | |
{ |
247 | 0 | getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); |
248 | 0 | } |
249 | |
|
250 | |
|
251 | |
public String getOnmouseover() |
252 | |
{ |
253 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseover); |
254 | |
} |
255 | |
|
256 | |
public void setOnmouseover(String onmouseover) |
257 | |
{ |
258 | 0 | getStateHelper().put(PropertyKeys.onmouseover, onmouseover ); |
259 | 0 | } |
260 | |
|
261 | |
|
262 | |
public String getOnmouseup() |
263 | |
{ |
264 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseup); |
265 | |
} |
266 | |
|
267 | |
public void setOnmouseup(String onmouseup) |
268 | |
{ |
269 | 0 | getStateHelper().put(PropertyKeys.onmouseup, onmouseup ); |
270 | 0 | } |
271 | |
|
272 | |
|
273 | |
public String getDir() |
274 | |
{ |
275 | 0 | return (String) getStateHelper().eval(PropertyKeys.dir); |
276 | |
} |
277 | |
|
278 | |
public void setDir(String dir) |
279 | |
{ |
280 | 0 | getStateHelper().put(PropertyKeys.dir, dir ); |
281 | 0 | } |
282 | |
|
283 | |
|
284 | |
public String getLang() |
285 | |
{ |
286 | 0 | return (String) getStateHelper().eval(PropertyKeys.lang); |
287 | |
} |
288 | |
|
289 | |
public void setLang(String lang) |
290 | |
{ |
291 | 0 | getStateHelper().put(PropertyKeys.lang, lang ); |
292 | 0 | } |
293 | |
|
294 | |
|
295 | |
public String getTitle() |
296 | |
{ |
297 | 0 | return (String) getStateHelper().eval(PropertyKeys.title); |
298 | |
} |
299 | |
|
300 | |
public void setTitle(String title) |
301 | |
{ |
302 | 0 | getStateHelper().put(PropertyKeys.title, title ); |
303 | 0 | } |
304 | |
|
305 | |
|
306 | |
public String getCharset() |
307 | |
{ |
308 | 0 | return (String) getStateHelper().eval(PropertyKeys.charset); |
309 | |
} |
310 | |
|
311 | |
public void setCharset(String charset) |
312 | |
{ |
313 | 0 | getStateHelper().put(PropertyKeys.charset, charset ); |
314 | 0 | } |
315 | |
|
316 | |
|
317 | |
public String getCoords() |
318 | |
{ |
319 | 0 | return (String) getStateHelper().eval(PropertyKeys.coords); |
320 | |
} |
321 | |
|
322 | |
public void setCoords(String coords) |
323 | |
{ |
324 | 0 | getStateHelper().put(PropertyKeys.coords, coords ); |
325 | 0 | } |
326 | |
|
327 | |
|
328 | |
public String getHreflang() |
329 | |
{ |
330 | 0 | return (String) getStateHelper().eval(PropertyKeys.hreflang); |
331 | |
} |
332 | |
|
333 | |
public void setHreflang(String hreflang) |
334 | |
{ |
335 | 0 | getStateHelper().put(PropertyKeys.hreflang, hreflang ); |
336 | 0 | } |
337 | |
|
338 | |
|
339 | |
public String getRel() |
340 | |
{ |
341 | 0 | return (String) getStateHelper().eval(PropertyKeys.rel); |
342 | |
} |
343 | |
|
344 | |
public void setRel(String rel) |
345 | |
{ |
346 | 0 | getStateHelper().put(PropertyKeys.rel, rel ); |
347 | 0 | } |
348 | |
|
349 | |
|
350 | |
public String getRev() |
351 | |
{ |
352 | 0 | return (String) getStateHelper().eval(PropertyKeys.rev); |
353 | |
} |
354 | |
|
355 | |
public void setRev(String rev) |
356 | |
{ |
357 | 0 | getStateHelper().put(PropertyKeys.rev, rev ); |
358 | 0 | } |
359 | |
|
360 | |
|
361 | |
public String getShape() |
362 | |
{ |
363 | 0 | return (String) getStateHelper().eval(PropertyKeys.shape); |
364 | |
} |
365 | |
|
366 | |
public void setShape(String shape) |
367 | |
{ |
368 | 0 | getStateHelper().put(PropertyKeys.shape, shape ); |
369 | 0 | } |
370 | |
|
371 | |
|
372 | |
public String getTarget() |
373 | |
{ |
374 | 0 | return (String) getStateHelper().eval(PropertyKeys.target); |
375 | |
} |
376 | |
|
377 | |
public void setTarget(String target) |
378 | |
{ |
379 | 0 | getStateHelper().put(PropertyKeys.target, target ); |
380 | 0 | } |
381 | |
|
382 | |
|
383 | |
public String getType() |
384 | |
{ |
385 | 0 | return (String) getStateHelper().eval(PropertyKeys.type); |
386 | |
} |
387 | |
|
388 | |
public void setType(String type) |
389 | |
{ |
390 | 0 | getStateHelper().put(PropertyKeys.type, type ); |
391 | 0 | } |
392 | |
|
393 | 0 | protected enum PropertyKeys |
394 | |
{ |
395 | 0 | disabled |
396 | 0 | , style |
397 | 0 | , styleClass |
398 | 0 | , tabindex |
399 | 0 | , onblur |
400 | 0 | , onfocus |
401 | 0 | , accesskey |
402 | 0 | , onclick |
403 | 0 | , ondblclick |
404 | 0 | , onkeydown |
405 | 0 | , onkeypress |
406 | 0 | , onkeyup |
407 | 0 | , onmousedown |
408 | 0 | , onmousemove |
409 | 0 | , onmouseout |
410 | 0 | , onmouseover |
411 | 0 | , onmouseup |
412 | 0 | , dir |
413 | 0 | , lang |
414 | 0 | , title |
415 | 0 | , charset |
416 | 0 | , coords |
417 | 0 | , hreflang |
418 | 0 | , rel |
419 | 0 | , rev |
420 | 0 | , shape |
421 | 0 | , target |
422 | 0 | , type |
423 | |
} |
424 | |
|
425 | |
} |