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