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