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