KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > faces > component > html > HtmlCommandLink


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package javax.faces.component.html;
17
18 import javax.faces.component.UICommand;
19 import javax.faces.context.FacesContext;
20 import javax.faces.el.ValueBinding;
21
22 /**
23  * @author Thomas Spiegl (latest modification by $Author: mwessendorf $)
24  * @version $Revision: 1.2 $ $Date: 2004/07/01 22:01:16 $
25  */

26 public class HtmlCommandLink extends UICommand
27 {
28     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
29

30     public static final String JavaDoc COMPONENT_TYPE = "javax.faces.HtmlCommandLink";
31     private static final String JavaDoc DEFAULT_RENDERER_TYPE = "javax.faces.Link";
32
33     private String JavaDoc _accesskey = null;
34     private String JavaDoc _charset = null;
35     private String JavaDoc _coords = null;
36     private String JavaDoc _dir = null;
37     private String JavaDoc _hreflang = null;
38     private String JavaDoc _lang = null;
39     private String JavaDoc _onblur = null;
40     private String JavaDoc _onclick = null;
41     private String JavaDoc _ondblclick = null;
42     private String JavaDoc _onfocus = null;
43     private String JavaDoc _onkeydown = null;
44     private String JavaDoc _onkeypress = null;
45     private String JavaDoc _onkeyup = null;
46     private String JavaDoc _onmousedown = null;
47     private String JavaDoc _onmousemove = null;
48     private String JavaDoc _onmouseout = null;
49     private String JavaDoc _onmouseover = null;
50     private String JavaDoc _onmouseup = null;
51     private String JavaDoc _rel = null;
52     private String JavaDoc _rev = null;
53     private String JavaDoc _shape = null;
54     private String JavaDoc _style = null;
55     private String JavaDoc _styleClass = null;
56     private String JavaDoc _tabindex = null;
57     private String JavaDoc _target = null;
58     private String JavaDoc _title = null;
59     private String JavaDoc _type = null;
60
61     public HtmlCommandLink()
62     {
63         setRendererType(DEFAULT_RENDERER_TYPE);
64     }
65
66
67     public void setAccesskey(String JavaDoc accesskey)
68     {
69         _accesskey = accesskey;
70     }
71
72     public String JavaDoc getAccesskey()
73     {
74         if (_accesskey != null) return _accesskey;
75         ValueBinding vb = getValueBinding("accesskey");
76         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
77     }
78
79     public void setCharset(String JavaDoc charset)
80     {
81         _charset = charset;
82     }
83
84     public String JavaDoc getCharset()
85     {
86         if (_charset != null) return _charset;
87         ValueBinding vb = getValueBinding("charset");
88         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
89     }
90
91     public void setCoords(String JavaDoc coords)
92     {
93         _coords = coords;
94     }
95
96     public String JavaDoc getCoords()
97     {
98         if (_coords != null) return _coords;
99         ValueBinding vb = getValueBinding("coords");
100         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
101     }
102
103     public void setDir(String JavaDoc dir)
104     {
105         _dir = dir;
106     }
107
108     public String JavaDoc getDir()
109     {
110         if (_dir != null) return _dir;
111         ValueBinding vb = getValueBinding("dir");
112         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
113     }
114
115     public void setHreflang(String JavaDoc hreflang)
116     {
117         _hreflang = hreflang;
118     }
119
120     public String JavaDoc getHreflang()
121     {
122         if (_hreflang != null) return _hreflang;
123         ValueBinding vb = getValueBinding("hreflang");
124         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
125     }
126
127     public void setLang(String JavaDoc lang)
128     {
129         _lang = lang;
130     }
131
132     public String JavaDoc getLang()
133     {
134         if (_lang != null) return _lang;
135         ValueBinding vb = getValueBinding("lang");
136         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
137     }
138
139     public void setOnblur(String JavaDoc onblur)
140     {
141         _onblur = onblur;
142     }
143
144     public String JavaDoc getOnblur()
145     {
146         if (_onblur != null) return _onblur;
147         ValueBinding vb = getValueBinding("onblur");
148         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
149     }
150
151     public void setOnclick(String JavaDoc onclick)
152     {
153         _onclick = onclick;
154     }
155
156     public String JavaDoc getOnclick()
157     {
158         if (_onclick != null) return _onclick;
159         ValueBinding vb = getValueBinding("onclick");
160         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
161     }
162
163     public void setOndblclick(String JavaDoc ondblclick)
164     {
165         _ondblclick = ondblclick;
166     }
167
168     public String JavaDoc getOndblclick()
169     {
170         if (_ondblclick != null) return _ondblclick;
171         ValueBinding vb = getValueBinding("ondblclick");
172         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
173     }
174
175     public void setOnfocus(String JavaDoc onfocus)
176     {
177         _onfocus = onfocus;
178     }
179
180     public String JavaDoc getOnfocus()
181     {
182         if (_onfocus != null) return _onfocus;
183         ValueBinding vb = getValueBinding("onfocus");
184         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
185     }
186
187     public void setOnkeydown(String JavaDoc onkeydown)
188     {
189         _onkeydown = onkeydown;
190     }
191
192     public String JavaDoc getOnkeydown()
193     {
194         if (_onkeydown != null) return _onkeydown;
195         ValueBinding vb = getValueBinding("onkeydown");
196         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
197     }
198
199     public void setOnkeypress(String JavaDoc onkeypress)
200     {
201         _onkeypress = onkeypress;
202     }
203
204     public String JavaDoc getOnkeypress()
205     {
206         if (_onkeypress != null) return _onkeypress;
207         ValueBinding vb = getValueBinding("onkeypress");
208         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
209     }
210
211     public void setOnkeyup(String JavaDoc onkeyup)
212     {
213         _onkeyup = onkeyup;
214     }
215
216     public String JavaDoc getOnkeyup()
217     {
218         if (_onkeyup != null) return _onkeyup;
219         ValueBinding vb = getValueBinding("onkeyup");
220         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
221     }
222
223     public void setOnmousedown(String JavaDoc onmousedown)
224     {
225         _onmousedown = onmousedown;
226     }
227
228     public String JavaDoc getOnmousedown()
229     {
230         if (_onmousedown != null) return _onmousedown;
231         ValueBinding vb = getValueBinding("onmousedown");
232         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
233     }
234
235     public void setOnmousemove(String JavaDoc onmousemove)
236     {
237         _onmousemove = onmousemove;
238     }
239
240     public String JavaDoc getOnmousemove()
241     {
242         if (_onmousemove != null) return _onmousemove;
243         ValueBinding vb = getValueBinding("onmousemove");
244         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
245     }
246
247     public void setOnmouseout(String JavaDoc onmouseout)
248     {
249         _onmouseout = onmouseout;
250     }
251
252     public String JavaDoc getOnmouseout()
253     {
254         if (_onmouseout != null) return _onmouseout;
255         ValueBinding vb = getValueBinding("onmouseout");
256         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
257     }
258
259     public void setOnmouseover(String JavaDoc onmouseover)
260     {
261         _onmouseover = onmouseover;
262     }
263
264     public String JavaDoc getOnmouseover()
265     {
266         if (_onmouseover != null) return _onmouseover;
267         ValueBinding vb = getValueBinding("onmouseover");
268         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
269     }
270
271     public void setOnmouseup(String JavaDoc onmouseup)
272     {
273         _onmouseup = onmouseup;
274     }
275
276     public String JavaDoc getOnmouseup()
277     {
278         if (_onmouseup != null) return _onmouseup;
279         ValueBinding vb = getValueBinding("onmouseup");
280         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
281     }
282
283     public void setRel(String JavaDoc rel)
284     {
285         _rel = rel;
286     }
287
288     public String JavaDoc getRel()
289     {
290         if (_rel != null) return _rel;
291         ValueBinding vb = getValueBinding("rel");
292         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
293     }
294
295     public void setRev(String JavaDoc rev)
296     {
297         _rev = rev;
298     }
299
300     public String JavaDoc getRev()
301     {
302         if (_rev != null) return _rev;
303         ValueBinding vb = getValueBinding("rev");
304         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
305     }
306
307     public void setShape(String JavaDoc shape)
308     {
309         _shape = shape;
310     }
311
312     public String JavaDoc getShape()
313     {
314         if (_shape != null) return _shape;
315         ValueBinding vb = getValueBinding("shape");
316         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
317     }
318
319     public void setStyle(String JavaDoc style)
320     {
321         _style = style;
322     }
323
324     public String JavaDoc getStyle()
325     {
326         if (_style != null) return _style;
327         ValueBinding vb = getValueBinding("style");
328         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
329     }
330
331     public void setStyleClass(String JavaDoc styleClass)
332     {
333         _styleClass = styleClass;
334     }
335
336     public String JavaDoc getStyleClass()
337     {
338         if (_styleClass != null) return _styleClass;
339         ValueBinding vb = getValueBinding("styleClass");
340         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
341     }
342
343     public void setTabindex(String JavaDoc tabindex)
344     {
345         _tabindex = tabindex;
346     }
347
348     public String JavaDoc getTabindex()
349     {
350         if (_tabindex != null) return _tabindex;
351         ValueBinding vb = getValueBinding("tabindex");
352         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
353     }
354
355     public void setTarget(String JavaDoc target)
356     {
357         _target = target;
358     }
359
360     public String JavaDoc getTarget()
361     {
362         if (_target != null) return _target;
363         ValueBinding vb = getValueBinding("target");
364         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
365     }
366
367     public void setTitle(String JavaDoc title)
368     {
369         _title = title;
370     }
371
372     public String JavaDoc getTitle()
373     {
374         if (_title != null) return _title;
375         ValueBinding vb = getValueBinding("title");
376         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
377     }
378
379     public void setType(String JavaDoc type)
380     {
381         _type = type;
382     }
383
384     public String JavaDoc getType()
385     {
386         if (_type != null) return _type;
387         ValueBinding vb = getValueBinding("type");
388         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
389     }
390
391
392     public Object JavaDoc saveState(FacesContext context)
393     {
394         Object JavaDoc values[] = new Object JavaDoc[28];
395         values[0] = super.saveState(context);
396         values[1] = _accesskey;
397         values[2] = _charset;
398         values[3] = _coords;
399         values[4] = _dir;
400         values[5] = _hreflang;
401         values[6] = _lang;
402         values[7] = _onblur;
403         values[8] = _onclick;
404         values[9] = _ondblclick;
405         values[10] = _onfocus;
406         values[11] = _onkeydown;
407         values[12] = _onkeypress;
408         values[13] = _onkeyup;
409         values[14] = _onmousedown;
410         values[15] = _onmousemove;
411         values[16] = _onmouseout;
412         values[17] = _onmouseover;
413         values[18] = _onmouseup;
414         values[19] = _rel;
415         values[20] = _rev;
416         values[21] = _shape;
417         values[22] = _style;
418         values[23] = _styleClass;
419         values[24] = _tabindex;
420         values[25] = _target;
421         values[26] = _title;
422         values[27] = _type;
423         return ((Object JavaDoc) (values));
424     }
425
426     public void restoreState(FacesContext context, Object JavaDoc state)
427     {
428         Object JavaDoc values[] = (Object JavaDoc[])state;
429         super.restoreState(context, values[0]);
430         _accesskey = (String JavaDoc)values[1];
431         _charset = (String JavaDoc)values[2];
432         _coords = (String JavaDoc)values[3];
433         _dir = (String JavaDoc)values[4];
434         _hreflang = (String JavaDoc)values[5];
435         _lang = (String JavaDoc)values[6];
436         _onblur = (String JavaDoc)values[7];
437         _onclick = (String JavaDoc)values[8];
438         _ondblclick = (String JavaDoc)values[9];
439         _onfocus = (String JavaDoc)values[10];
440         _onkeydown = (String JavaDoc)values[11];
441         _onkeypress = (String JavaDoc)values[12];
442         _onkeyup = (String JavaDoc)values[13];
443         _onmousedown = (String JavaDoc)values[14];
444         _onmousemove = (String JavaDoc)values[15];
445         _onmouseout = (String JavaDoc)values[16];
446         _onmouseover = (String JavaDoc)values[17];
447         _onmouseup = (String JavaDoc)values[18];
448         _rel = (String JavaDoc)values[19];
449         _rev = (String JavaDoc)values[20];
450         _shape = (String JavaDoc)values[21];
451         _style = (String JavaDoc)values[22];
452         _styleClass = (String JavaDoc)values[23];
453         _tabindex = (String JavaDoc)values[24];
454         _target = (String JavaDoc)values[25];
455         _title = (String JavaDoc)values[26];
456         _type = (String JavaDoc)values[27];
457     }
458     //------------------ GENERATED CODE END ---------------------------------------
459
}
460
Popular Tags