1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 *
4 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5 *
6 * The contents of this file are subject to the terms of either the GNU
7 * General Public License Version 2 only ("GPL") or the Common Development
8 * and Distribution License("CDDL") (collectively, the "License"). You
9 * may not use this file except in compliance with the License. You can obtain
10 * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
11 * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
12 * language governing permissions and limitations under the License.
13 *
14 * When distributing the software, include this License Header Notice in each
15 * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
16 * Sun designates this particular file as subject to the "Classpath" exception
17 * as provided by Sun in the GPL Version 2 section of the License file that
18 * accompanied this code. If applicable, add the following below the License
19 * Header, with the fields enclosed by brackets [] replaced by your own
20 * identifying information: "Portions Copyrighted [year]
21 * [name of copyright owner]"
22 *
23 * Contributor(s):
24 *
25 * If you wish your version of this file to be governed by only the CDDL or
26 * only the GPL Version 2, indicate your decision by adding "[Contributor]
27 * elects to include this software in this distribution under the [CDDL or GPL
28 * Version 2] license." If you don't indicate a single choice of license, a
29 * recipient has the option to distribute your version of this file under
30 * either the CDDL, the GPL Version 2 or to extend the choice of license to
31 * its licensees as provided above. However, if you add GPL Version 2 code
32 * and therefore, elected the GPL Version 2 license, then the option applies
33 * only if the new code is made subject to such option by the copyright
34 * holder.
35 */
36 package javax.faces.component.html;
37
38 import java.io.IOException;
39 import java.util.List;
40 import java.util.ArrayList;
41 import java.util.Arrays;
42
43 import javax.faces.context.FacesContext;
44 import javax.el.MethodExpression;
45 import javax.el.ValueExpression;
46
47
48 /*
49 * ******* GENERATED CODE - DO NOT EDIT *******
50 */
51
52
53 /**
54 * <p>Represents a multiple-selection component that is rendered
55 * as an HTML <code>select</code> element, showing either all
56 * available options or the specified number of options.</p>
57 * <p>By default, the <code>rendererType</code> property must be set to "<code>javax.faces.Listbox</code>".
58 * This value can be changed by calling the <code>setRendererType()</code> method.</p>
59 */
60 public class HtmlSelectManyListbox extends javax.faces.component.UISelectMany {
61
62
63
64 private static final String[] OPTIMIZED_PACKAGES = {
65 "javax.faces.component",
66 "javax.faces.component.html"
67 };
68
69 public HtmlSelectManyListbox() {
70 super();
71 setRendererType("javax.faces.Listbox");
72 }
73
74
75 /**
76 * <p>The standard component type for this component.</p>
77 */
78 public static final String COMPONENT_TYPE = "javax.faces.HtmlSelectManyListbox";
79
80
81 private java.lang.String accesskey;
82 /**
83 * <p>Return the value of the <code>accesskey</code> property.</p>
84 * <p>Contents: Access key that, when pressed, transfers focus
85 * to this element.
86 */
87 public java.lang.String getAccesskey() {
88 if (null != this.accesskey) {
89 return this.accesskey;
90 }
91 ValueExpression _ve = getValueExpression("accesskey");
92 if (_ve != null) {
93 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
94 } else {
95 return null;
96 }
97 }
98
99 /**
100 * <p>Set the value of the <code>accesskey</code> property.</p>
101 */
102 public void setAccesskey(java.lang.String accesskey) {
103 this.accesskey = accesskey;
104 handleAttribute("accesskey", accesskey);
105 }
106
107
108 private java.lang.String dir;
109 /**
110 * <p>Return the value of the <code>dir</code> property.</p>
111 * <p>Contents: Direction indication for text that does not inherit directionality.
112 * Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
113 */
114 public java.lang.String getDir() {
115 if (null != this.dir) {
116 return this.dir;
117 }
118 ValueExpression _ve = getValueExpression("dir");
119 if (_ve != null) {
120 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
121 } else {
122 return null;
123 }
124 }
125
126 /**
127 * <p>Set the value of the <code>dir</code> property.</p>
128 */
129 public void setDir(java.lang.String dir) {
130 this.dir = dir;
131 handleAttribute("dir", dir);
132 }
133
134
135 private java.lang.Boolean disabled;
136 /**
137 * <p>Return the value of the <code>disabled</code> property.</p>
138 * <p>Contents: Flag indicating that this element must never receive focus or
139 * be included in a subsequent submit. A value of false causes
140 * no attribute to be rendered, while a value of true causes the
141 * attribute to be rendered as disabled="disabled".
142 */
143 public boolean isDisabled() {
144 if (null != this.disabled) {
145 return this.disabled;
146 }
147 ValueExpression _ve = getValueExpression("disabled");
148 if (_ve != null) {
149 return (java.lang.Boolean) _ve.getValue(getFacesContext().getELContext());
150 } else {
151 return false;
152 }
153 }
154
155 /**
156 * <p>Set the value of the <code>disabled</code> property.</p>
157 */
158 public void setDisabled(boolean disabled) {
159 this.disabled = disabled;
160 }
161
162
163 private java.lang.String disabledClass;
164 /**
165 * <p>Return the value of the <code>disabledClass</code> property.</p>
166 * <p>Contents: CSS style class to apply to the rendered label
167 * on disabled options.
168 */
169 public java.lang.String getDisabledClass() {
170 if (null != this.disabledClass) {
171 return this.disabledClass;
172 }
173 ValueExpression _ve = getValueExpression("disabledClass");
174 if (_ve != null) {
175 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
176 } else {
177 return null;
178 }
179 }
180
181 /**
182 * <p>Set the value of the <code>disabledClass</code> property.</p>
183 */
184 public void setDisabledClass(java.lang.String disabledClass) {
185 this.disabledClass = disabledClass;
186 }
187
188
189 private java.lang.String enabledClass;
190 /**
191 * <p>Return the value of the <code>enabledClass</code> property.</p>
192 * <p>Contents: CSS style class to apply to the rendered label
193 * on enabled options.
194 */
195 public java.lang.String getEnabledClass() {
196 if (null != this.enabledClass) {
197 return this.enabledClass;
198 }
199 ValueExpression _ve = getValueExpression("enabledClass");
200 if (_ve != null) {
201 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
202 } else {
203 return null;
204 }
205 }
206
207 /**
208 * <p>Set the value of the <code>enabledClass</code> property.</p>
209 */
210 public void setEnabledClass(java.lang.String enabledClass) {
211 this.enabledClass = enabledClass;
212 }
213
214
215 private java.lang.String label;
216 /**
217 * <p>Return the value of the <code>label</code> property.</p>
218 * <p>Contents: A localized user presentable name for this component.
219 */
220 public java.lang.String getLabel() {
221 if (null != this.label) {
222 return this.label;
223 }
224 ValueExpression _ve = getValueExpression("label");
225 if (_ve != null) {
226 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
227 } else {
228 return null;
229 }
230 }
231
232 /**
233 * <p>Set the value of the <code>label</code> property.</p>
234 */
235 public void setLabel(java.lang.String label) {
236 this.label = label;
237 }
238
239
240 private java.lang.String lang;
241 /**
242 * <p>Return the value of the <code>lang</code> property.</p>
243 * <p>Contents: Code describing the language used in the generated markup
244 * for this component.
245 */
246 public java.lang.String getLang() {
247 if (null != this.lang) {
248 return this.lang;
249 }
250 ValueExpression _ve = getValueExpression("lang");
251 if (_ve != null) {
252 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
253 } else {
254 return null;
255 }
256 }
257
258 /**
259 * <p>Set the value of the <code>lang</code> property.</p>
260 */
261 public void setLang(java.lang.String lang) {
262 this.lang = lang;
263 handleAttribute("lang", lang);
264 }
265
266
267 private java.lang.String onblur;
268 /**
269 * <p>Return the value of the <code>onblur</code> property.</p>
270 * <p>Contents: Javascript code executed when this element loses focus.
271 */
272 public java.lang.String getOnblur() {
273 if (null != this.onblur) {
274 return this.onblur;
275 }
276 ValueExpression _ve = getValueExpression("onblur");
277 if (_ve != null) {
278 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
279 } else {
280 return null;
281 }
282 }
283
284 /**
285 * <p>Set the value of the <code>onblur</code> property.</p>
286 */
287 public void setOnblur(java.lang.String onblur) {
288 this.onblur = onblur;
289 handleAttribute("onblur", onblur);
290 }
291
292
293 private java.lang.String onchange;
294 /**
295 * <p>Return the value of the <code>onchange</code> property.</p>
296 * <p>Contents: Javascript code executed when this element loses focus
297 * and its value has been modified since gaining focus.
298 */
299 public java.lang.String getOnchange() {
300 if (null != this.onchange) {
301 return this.onchange;
302 }
303 ValueExpression _ve = getValueExpression("onchange");
304 if (_ve != null) {
305 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
306 } else {
307 return null;
308 }
309 }
310
311 /**
312 * <p>Set the value of the <code>onchange</code> property.</p>
313 */
314 public void setOnchange(java.lang.String onchange) {
315 this.onchange = onchange;
316 handleAttribute("onchange", onchange);
317 }
318
319
320 private java.lang.String onclick;
321 /**
322 * <p>Return the value of the <code>onclick</code> property.</p>
323 * <p>Contents: Javascript code executed when a pointer button is
324 * clicked over this element.
325 */
326 public java.lang.String getOnclick() {
327 if (null != this.onclick) {
328 return this.onclick;
329 }
330 ValueExpression _ve = getValueExpression("onclick");
331 if (_ve != null) {
332 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
333 } else {
334 return null;
335 }
336 }
337
338 /**
339 * <p>Set the value of the <code>onclick</code> property.</p>
340 */
341 public void setOnclick(java.lang.String onclick) {
342 this.onclick = onclick;
343 handleAttribute("onclick", onclick);
344 }
345
346
347 private java.lang.String ondblclick;
348 /**
349 * <p>Return the value of the <code>ondblclick</code> property.</p>
350 * <p>Contents: Javascript code executed when a pointer button is
351 * double clicked over this element.
352 */
353 public java.lang.String getOndblclick() {
354 if (null != this.ondblclick) {
355 return this.ondblclick;
356 }
357 ValueExpression _ve = getValueExpression("ondblclick");
358 if (_ve != null) {
359 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
360 } else {
361 return null;
362 }
363 }
364
365 /**
366 * <p>Set the value of the <code>ondblclick</code> property.</p>
367 */
368 public void setOndblclick(java.lang.String ondblclick) {
369 this.ondblclick = ondblclick;
370 handleAttribute("ondblclick", ondblclick);
371 }
372
373
374 private java.lang.String onfocus;
375 /**
376 * <p>Return the value of the <code>onfocus</code> property.</p>
377 * <p>Contents: Javascript code executed when this element receives focus.
378 */
379 public java.lang.String getOnfocus() {
380 if (null != this.onfocus) {
381 return this.onfocus;
382 }
383 ValueExpression _ve = getValueExpression("onfocus");
384 if (_ve != null) {
385 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
386 } else {
387 return null;
388 }
389 }
390
391 /**
392 * <p>Set the value of the <code>onfocus</code> property.</p>
393 */
394 public void setOnfocus(java.lang.String onfocus) {
395 this.onfocus = onfocus;
396 handleAttribute("onfocus", onfocus);
397 }
398
399
400 private java.lang.String onkeydown;
401 /**
402 * <p>Return the value of the <code>onkeydown</code> property.</p>
403 * <p>Contents: Javascript code executed when a key is
404 * pressed down over this element.
405 */
406 public java.lang.String getOnkeydown() {
407 if (null != this.onkeydown) {
408 return this.onkeydown;
409 }
410 ValueExpression _ve = getValueExpression("onkeydown");
411 if (_ve != null) {
412 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
413 } else {
414 return null;
415 }
416 }
417
418 /**
419 * <p>Set the value of the <code>onkeydown</code> property.</p>
420 */
421 public void setOnkeydown(java.lang.String onkeydown) {
422 this.onkeydown = onkeydown;
423 handleAttribute("onkeydown", onkeydown);
424 }
425
426
427 private java.lang.String onkeypress;
428 /**
429 * <p>Return the value of the <code>onkeypress</code> property.</p>
430 * <p>Contents: Javascript code executed when a key is
431 * pressed and released over this element.
432 */
433 public java.lang.String getOnkeypress() {
434 if (null != this.onkeypress) {
435 return this.onkeypress;
436 }
437 ValueExpression _ve = getValueExpression("onkeypress");
438 if (_ve != null) {
439 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
440 } else {
441 return null;
442 }
443 }
444
445 /**
446 * <p>Set the value of the <code>onkeypress</code> property.</p>
447 */
448 public void setOnkeypress(java.lang.String onkeypress) {
449 this.onkeypress = onkeypress;
450 handleAttribute("onkeypress", onkeypress);
451 }
452
453
454 private java.lang.String onkeyup;
455 /**
456 * <p>Return the value of the <code>onkeyup</code> property.</p>
457 * <p>Contents: Javascript code executed when a key is
458 * released over this element.
459 */
460 public java.lang.String getOnkeyup() {
461 if (null != this.onkeyup) {
462 return this.onkeyup;
463 }
464 ValueExpression _ve = getValueExpression("onkeyup");
465 if (_ve != null) {
466 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
467 } else {
468 return null;
469 }
470 }
471
472 /**
473 * <p>Set the value of the <code>onkeyup</code> property.</p>
474 */
475 public void setOnkeyup(java.lang.String onkeyup) {
476 this.onkeyup = onkeyup;
477 handleAttribute("onkeyup", onkeyup);
478 }
479
480
481 private java.lang.String onmousedown;
482 /**
483 * <p>Return the value of the <code>onmousedown</code> property.</p>
484 * <p>Contents: Javascript code executed when a pointer button is
485 * pressed down over this element.
486 */
487 public java.lang.String getOnmousedown() {
488 if (null != this.onmousedown) {
489 return this.onmousedown;
490 }
491 ValueExpression _ve = getValueExpression("onmousedown");
492 if (_ve != null) {
493 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
494 } else {
495 return null;
496 }
497 }
498
499 /**
500 * <p>Set the value of the <code>onmousedown</code> property.</p>
501 */
502 public void setOnmousedown(java.lang.String onmousedown) {
503 this.onmousedown = onmousedown;
504 handleAttribute("onmousedown", onmousedown);
505 }
506
507
508 private java.lang.String onmousemove;
509 /**
510 * <p>Return the value of the <code>onmousemove</code> property.</p>
511 * <p>Contents: Javascript code executed when a pointer button is
512 * moved within this element.
513 */
514 public java.lang.String getOnmousemove() {
515 if (null != this.onmousemove) {
516 return this.onmousemove;
517 }
518 ValueExpression _ve = getValueExpression("onmousemove");
519 if (_ve != null) {
520 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
521 } else {
522 return null;
523 }
524 }
525
526 /**
527 * <p>Set the value of the <code>onmousemove</code> property.</p>
528 */
529 public void setOnmousemove(java.lang.String onmousemove) {
530 this.onmousemove = onmousemove;
531 handleAttribute("onmousemove", onmousemove);
532 }
533
534
535 private java.lang.String onmouseout;
536 /**
537 * <p>Return the value of the <code>onmouseout</code> property.</p>
538 * <p>Contents: Javascript code executed when a pointer button is
539 * moved away from this element.
540 */
541 public java.lang.String getOnmouseout() {
542 if (null != this.onmouseout) {
543 return this.onmouseout;
544 }
545 ValueExpression _ve = getValueExpression("onmouseout");
546 if (_ve != null) {
547 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
548 } else {
549 return null;
550 }
551 }
552
553 /**
554 * <p>Set the value of the <code>onmouseout</code> property.</p>
555 */
556 public void setOnmouseout(java.lang.String onmouseout) {
557 this.onmouseout = onmouseout;
558 handleAttribute("onmouseout", onmouseout);
559 }
560
561
562 private java.lang.String onmouseover;
563 /**
564 * <p>Return the value of the <code>onmouseover</code> property.</p>
565 * <p>Contents: Javascript code executed when a pointer button is
566 * moved onto this element.
567 */
568 public java.lang.String getOnmouseover() {
569 if (null != this.onmouseover) {
570 return this.onmouseover;
571 }
572 ValueExpression _ve = getValueExpression("onmouseover");
573 if (_ve != null) {
574 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
575 } else {
576 return null;
577 }
578 }
579
580 /**
581 * <p>Set the value of the <code>onmouseover</code> property.</p>
582 */
583 public void setOnmouseover(java.lang.String onmouseover) {
584 this.onmouseover = onmouseover;
585 handleAttribute("onmouseover", onmouseover);
586 }
587
588
589 private java.lang.String onmouseup;
590 /**
591 * <p>Return the value of the <code>onmouseup</code> property.</p>
592 * <p>Contents: Javascript code executed when a pointer button is
593 * released over this element.
594 */
595 public java.lang.String getOnmouseup() {
596 if (null != this.onmouseup) {
597 return this.onmouseup;
598 }
599 ValueExpression _ve = getValueExpression("onmouseup");
600 if (_ve != null) {
601 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
602 } else {
603 return null;
604 }
605 }
606
607 /**
608 * <p>Set the value of the <code>onmouseup</code> property.</p>
609 */
610 public void setOnmouseup(java.lang.String onmouseup) {
611 this.onmouseup = onmouseup;
612 handleAttribute("onmouseup", onmouseup);
613 }
614
615
616 private java.lang.String onselect;
617 /**
618 * <p>Return the value of the <code>onselect</code> property.</p>
619 * <p>Contents: Javascript code executed when text within this
620 * element is selected by the user.
621 */
622 public java.lang.String getOnselect() {
623 if (null != this.onselect) {
624 return this.onselect;
625 }
626 ValueExpression _ve = getValueExpression("onselect");
627 if (_ve != null) {
628 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
629 } else {
630 return null;
631 }
632 }
633
634 /**
635 * <p>Set the value of the <code>onselect</code> property.</p>
636 */
637 public void setOnselect(java.lang.String onselect) {
638 this.onselect = onselect;
639 handleAttribute("onselect", onselect);
640 }
641
642
643 private java.lang.Boolean readonly;
644 /**
645 * <p>Return the value of the <code>readonly</code> property.</p>
646 * <p>Contents: Flag indicating that this component will prohibit changes by
647 * the user. The element may receive focus unless it has also
648 * been disabled. A value of false causes
649 * no attribute to be rendered, while a value of true causes the
650 * attribute to be rendered as readonly="readonly".
651 */
652 public boolean isReadonly() {
653 if (null != this.readonly) {
654 return this.readonly;
655 }
656 ValueExpression _ve = getValueExpression("readonly");
657 if (_ve != null) {
658 return (java.lang.Boolean) _ve.getValue(getFacesContext().getELContext());
659 } else {
660 return false;
661 }
662 }
663
664 /**
665 * <p>Set the value of the <code>readonly</code> property.</p>
666 */
667 public void setReadonly(boolean readonly) {
668 this.readonly = readonly;
669 }
670
671
672 private java.lang.Integer size;
673 /**
674 * <p>Return the value of the <code>size</code> property.</p>
675 * <p>Contents: Number of available options to be shown at all times.
676 * If not specified, all available options are shown.
677 */
678 public int getSize() {
679 if (null != this.size) {
680 return this.size;
681 }
682 ValueExpression _ve = getValueExpression("size");
683 if (_ve != null) {
684 return (java.lang.Integer) _ve.getValue(getFacesContext().getELContext());
685 } else {
686 return Integer.MIN_VALUE;
687 }
688 }
689
690 /**
691 * <p>Set the value of the <code>size</code> property.</p>
692 */
693 public void setSize(int size) {
694 this.size = size;
695 }
696
697
698 private java.lang.String style;
699 /**
700 * <p>Return the value of the <code>style</code> property.</p>
701 * <p>Contents: CSS style(s) to be applied when this component is rendered.
702 */
703 public java.lang.String getStyle() {
704 if (null != this.style) {
705 return this.style;
706 }
707 ValueExpression _ve = getValueExpression("style");
708 if (_ve != null) {
709 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
710 } else {
711 return null;
712 }
713 }
714
715 /**
716 * <p>Set the value of the <code>style</code> property.</p>
717 */
718 public void setStyle(java.lang.String style) {
719 this.style = style;
720 handleAttribute("style", style);
721 }
722
723
724 private java.lang.String styleClass;
725 /**
726 * <p>Return the value of the <code>styleClass</code> property.</p>
727 * <p>Contents: Space-separated list of CSS style class(es) to be applied when
728 * this element is rendered. This value must be passed through as the "class" attribute on generated markup.
729 */
730 public java.lang.String getStyleClass() {
731 if (null != this.styleClass) {
732 return this.styleClass;
733 }
734 ValueExpression _ve = getValueExpression("styleClass");
735 if (_ve != null) {
736 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
737 } else {
738 return null;
739 }
740 }
741
742 /**
743 * <p>Set the value of the <code>styleClass</code> property.</p>
744 */
745 public void setStyleClass(java.lang.String styleClass) {
746 this.styleClass = styleClass;
747 }
748
749
750 private java.lang.String tabindex;
751 /**
752 * <p>Return the value of the <code>tabindex</code> property.</p>
753 * <p>Contents: Position of this element in the tabbing order
754 * for the current document. This value must be
755 * an integer between 0 and 32767.
756 */
757 public java.lang.String getTabindex() {
758 if (null != this.tabindex) {
759 return this.tabindex;
760 }
761 ValueExpression _ve = getValueExpression("tabindex");
762 if (_ve != null) {
763 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
764 } else {
765 return null;
766 }
767 }
768
769 /**
770 * <p>Set the value of the <code>tabindex</code> property.</p>
771 */
772 public void setTabindex(java.lang.String tabindex) {
773 this.tabindex = tabindex;
774 handleAttribute("tabindex", tabindex);
775 }
776
777
778 private java.lang.String title;
779 /**
780 * <p>Return the value of the <code>title</code> property.</p>
781 * <p>Contents: Advisory title information about markup elements generated
782 * for this component.
783 */
784 public java.lang.String getTitle() {
785 if (null != this.title) {
786 return this.title;
787 }
788 ValueExpression _ve = getValueExpression("title");
789 if (_ve != null) {
790 return (java.lang.String) _ve.getValue(getFacesContext().getELContext());
791 } else {
792 return null;
793 }
794 }
795
796 /**
797 * <p>Set the value of the <code>title</code> property.</p>
798 */
799 public void setTitle(java.lang.String title) {
800 this.title = title;
801 handleAttribute("title", title);
802 }
803
804
805 private Object[] _values;
806
807 public Object saveState(FacesContext _context) {
808 if (_values == null) {
809 _values = new Object[28];
810 }
811 _values[0] = super.saveState(_context);
812 _values[1] = accesskey;
813 _values[2] = dir;
814 _values[3] = disabled;
815 _values[4] = disabledClass;
816 _values[5] = enabledClass;
817 _values[6] = label;
818 _values[7] = lang;
819 _values[8] = onblur;
820 _values[9] = onchange;
821 _values[10] = onclick;
822 _values[11] = ondblclick;
823 _values[12] = onfocus;
824 _values[13] = onkeydown;
825 _values[14] = onkeypress;
826 _values[15] = onkeyup;
827 _values[16] = onmousedown;
828 _values[17] = onmousemove;
829 _values[18] = onmouseout;
830 _values[19] = onmouseover;
831 _values[20] = onmouseup;
832 _values[21] = onselect;
833 _values[22] = readonly;
834 _values[23] = size;
835 _values[24] = style;
836 _values[25] = styleClass;
837 _values[26] = tabindex;
838 _values[27] = title;
839 return _values;
840 }
841
842
843 public void restoreState(FacesContext _context, Object _state) {
844 _values = (Object[]) _state;
845 super.restoreState(_context, _values[0]);
846 this.accesskey = (java.lang.String) _values[1];
847 this.dir = (java.lang.String) _values[2];
848 this.disabled = (java.lang.Boolean) _values[3];
849 this.disabledClass = (java.lang.String) _values[4];
850 this.enabledClass = (java.lang.String) _values[5];
851 this.label = (java.lang.String) _values[6];
852 this.lang = (java.lang.String) _values[7];
853 this.onblur = (java.lang.String) _values[8];
854 this.onchange = (java.lang.String) _values[9];
855 this.onclick = (java.lang.String) _values[10];
856 this.ondblclick = (java.lang.String) _values[11];
857 this.onfocus = (java.lang.String) _values[12];
858 this.onkeydown = (java.lang.String) _values[13];
859 this.onkeypress = (java.lang.String) _values[14];
860 this.onkeyup = (java.lang.String) _values[15];
861 this.onmousedown = (java.lang.String) _values[16];
862 this.onmousemove = (java.lang.String) _values[17];
863 this.onmouseout = (java.lang.String) _values[18];
864 this.onmouseover = (java.lang.String) _values[19];
865 this.onmouseup = (java.lang.String) _values[20];
866 this.onselect = (java.lang.String) _values[21];
867 this.readonly = (java.lang.Boolean) _values[22];
868 this.size = (java.lang.Integer) _values[23];
869 this.style = (java.lang.String) _values[24];
870 this.styleClass = (java.lang.String) _values[25];
871 this.tabindex = (java.lang.String) _values[26];
872 this.title = (java.lang.String) _values[27];
873 }
874
875
876 private void handleAttribute(String name, Object value) {
877 List<String> setAttributes = null;
878 String pkg = this.getClass().getPackage().getName();
879 if (Arrays.binarySearch(OPTIMIZED_PACKAGES, pkg) >= 0) {
880 setAttributes = (List<String>) this.getAttributes().get("javax.faces.component.UIComponentBase.attributesThatAreSet");
881 if (setAttributes == null) {
882 setAttributes = new ArrayList<String>(6);
883 this.getAttributes().put("javax.faces.component.UIComponentBase.attributesThatAreSet", setAttributes);
884 }
885 if (value == null) {
886 setAttributes.remove(name);
887 } else if (!setAttributes.contains(name)) {
888 setAttributes.add(name);
889 }
890 }
891 }
892
893 }