KickJava   Java API By Example, From Geeks To Geeks.

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


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.UIInput;
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.3 $ $Date: 2004/07/01 22:01:16 $
25  */

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

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