001    // ---------- Attention: Generated code, please do not modify! -----------  
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more
005     * contributor license agreements.  See the NOTICE file distributed with
006     * this work for additional information regarding copyright ownership.
007     * The ASF licenses this file to You under the Apache License, Version 2.0
008     * (the "License"); you may not use this file except in compliance with
009     * the License.  You may obtain a copy of the License at
010     *
011     *      http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing, software
014     * distributed under the License is distributed on an "AS IS" BASIS,
015     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016     * See the License for the specific language governing permissions and
017     * limitations under the License.
018     */
019    
020    package org.apache.myfaces.tobago.component;
021    
022    import javax.faces.context.FacesContext;
023    import org.apache.myfaces.tobago.context.Markup;
024    import org.apache.myfaces.tobago.internal.component.AbstractUISelectMany;
025    import org.apache.myfaces.tobago.layout.Display;
026    import org.apache.myfaces.tobago.layout.Measure;
027    import org.apache.commons.lang.ArrayUtils;
028    import org.apache.commons.lang.StringUtils;
029    import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
030    import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
031    import org.apache.myfaces.tobago.internal.util.Deprecation;
032    import org.apache.myfaces.tobago.renderkit.MarginValues;
033    import org.apache.myfaces.tobago.renderkit.SpacingValues;
034    import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
035    import javax.el.ELException;
036    import javax.faces.FacesException;
037    import java.util.ArrayList;
038    import java.util.List;
039    import javax.el.MethodExpression;
040    import javax.el.ValueExpression;
041    
042    /** 
043     Render a group of checkboxes.
044      * UIComponent class, generated from template {@code component1.2.stg} with class
045      * {@link org.apache.myfaces.tobago.internal.taglib.component.SelectManyCheckboxTagDeclaration}.
046     */
047    public class UISelectManyCheckbox
048        extends AbstractUISelectMany implements SupportsMarkup {
049    
050      public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.SelectManyCheckbox";
051    
052      private org.apache.myfaces.tobago.context.Markup markup;
053      private org.apache.myfaces.tobago.layout.Measure marginLeft;
054      private java.lang.Integer tabIndex;
055      private org.apache.myfaces.tobago.layout.Measure minimumHeight;
056      private org.apache.myfaces.tobago.layout.Measure height;
057      private org.apache.myfaces.tobago.layout.Measure minimumWidth;
058      private java.lang.Boolean inline;
059      private java.lang.Integer rowSpan;
060      private java.lang.Boolean focus;
061      private org.apache.myfaces.tobago.layout.Measure left;
062      private java.lang.Integer columnSpan;
063      private java.lang.Boolean required;
064      private org.apache.myfaces.tobago.layout.Measure top;
065      private org.apache.myfaces.tobago.layout.Measure maximumHeight;
066      private org.apache.myfaces.tobago.layout.Measure currentWidth;
067      private org.apache.myfaces.tobago.layout.Measure marginTop;
068      private org.apache.myfaces.tobago.layout.Measure width;
069      private org.apache.myfaces.tobago.layout.Measure marginRight;
070      private org.apache.myfaces.tobago.layout.Measure preferredHeight;
071      private org.apache.myfaces.tobago.layout.Measure currentHeight;
072      private org.apache.myfaces.tobago.layout.Display display;
073      private org.apache.myfaces.tobago.layout.Measure maximumWidth;
074      private java.lang.String onchange;
075      private org.apache.myfaces.tobago.layout.Measure preferredWidth;
076      private org.apache.myfaces.tobago.layout.Measure marginBottom;
077      private java.lang.String renderRange;
078      private java.lang.Integer verticalIndex;
079      private org.apache.myfaces.tobago.context.Markup currentMarkup;
080      private java.lang.Integer horizontalIndex;
081      private java.lang.Boolean readonly;
082      private java.lang.Boolean disabled;
083    
084    
085      public org.apache.myfaces.tobago.context.Markup getMarkup() {
086        if (markup != null) {
087          return markup;
088        }
089        ValueExpression ve = getValueExpression("markup");
090        if (ve != null) {
091          try {
092            Object object = ve.getValue(getFacesContext().getELContext());
093            return Markup.valueOf(object);
094          } catch (ELException e) {
095                      throw new FacesException(e);
096              }
097        }
098        return null;
099      }
100    
101      public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
102        this.markup = markup;
103      }
104    
105      public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
106        if (marginLeft != null) {
107          return marginLeft;
108        }
109        ValueExpression ve = getValueExpression("marginLeft");
110        if (ve != null) {
111          try {
112            Object object = ve.getValue(getFacesContext().getELContext());
113            return Measure.valueOf(object);
114          } catch (ELException e) {
115                      throw new FacesException(e);
116              }
117        }
118        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this);
119      }
120    
121      public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
122        this.marginLeft = marginLeft;
123      }
124    
125      /**
126      Controls the navigation of the focus through the
127       input controls on a page with the Tab-Key.
128       The navigation starts from the element with
129       the lowest tabIndex value to the element with the highest value.
130       Elements that have identical tabIndex values should be navigated
131       in the order they appear in the character stream
132       Elements that are disabled or with a negative tabIndex
133       do not participate in the tabbing order.
134    
135      */
136      public java.lang.Integer getTabIndex() {
137        if (tabIndex != null) {
138          return tabIndex;
139        }
140        ValueExpression ve = getValueExpression("tabIndex");
141        if (ve != null) {
142          try {
143            Number number = (Number) ve.getValue(getFacesContext().getELContext());
144            if (number != null) {
145              return number.intValue();
146            }
147          } catch (ELException e) {
148                      throw new FacesException(e);
149              }
150        }
151        return null;
152      }
153    
154      public void setTabIndex(java.lang.Integer tabIndex) {
155        this.tabIndex = tabIndex;
156      }
157    
158      public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
159        if (minimumHeight != null) {
160          return minimumHeight;
161        }
162        ValueExpression ve = getValueExpression("minimumHeight");
163        if (ve != null) {
164          try {
165            Object object = ve.getValue(getFacesContext().getELContext());
166            return Measure.valueOf(object);
167          } catch (ELException e) {
168                      throw new FacesException(e);
169              }
170        }
171        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this);
172      }
173    
174      public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
175        this.minimumHeight = minimumHeight;
176      }
177    
178      /**
179      This value will usually be set by the layout manager.
180    
181      */
182      public org.apache.myfaces.tobago.layout.Measure getHeight() {
183        if (height != null) {
184          return height;
185        }
186        ValueExpression ve = getValueExpression("height");
187        if (ve != null) {
188          try {
189            Object object = ve.getValue(getFacesContext().getELContext());
190            return Measure.valueOf(object);
191          } catch (ELException e) {
192                      throw new FacesException(e);
193              }
194        }
195        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this);
196      }
197    
198      public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
199        this.height = height;
200      }
201    
202      public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
203        if (minimumWidth != null) {
204          return minimumWidth;
205        }
206        ValueExpression ve = getValueExpression("minimumWidth");
207        if (ve != null) {
208          try {
209            Object object = ve.getValue(getFacesContext().getELContext());
210            return Measure.valueOf(object);
211          } catch (ELException e) {
212                      throw new FacesException(e);
213              }
214        }
215        return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this);
216      }
217    
218      public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
219        this.minimumWidth = minimumWidth;
220      }
221    
222      /**
223      Flag indicating this component should rendered as an inline element.
224      <br />Default: <code>false</code>
225      */
226      public boolean isInline() {
227        if (inline != null) {
228          return inline;
229        }
230        ValueExpression ve = getValueExpression("inline");
231        if (ve != null) {
232          try {
233            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
234            if (bool != null) {
235              return bool;
236            }
237          } catch (ELException e) {
238                      throw new FacesException(e);
239              }
240        }
241        return false;
242      }
243    
244      public void setInline(boolean inline) {
245        this.inline = inline;
246      }
247    
248      public java.lang.Integer getRowSpan() {
249        if (rowSpan != null) {
250          return rowSpan;
251        }
252        ValueExpression ve = getValueExpression("rowSpan");
253        if (ve != null) {
254          try {
255            Number number = (Number) ve.getValue(getFacesContext().getELContext());
256            if (number != null) {
257              return number.intValue();
258            }
259          } catch (ELException e) {
260                      throw new FacesException(e);
261              }
262        }
263        return 1;
264      }
265    
266      public void setRowSpan(java.lang.Integer rowSpan) {
267        this.rowSpan = rowSpan;
268      }
269    
270      /**
271      Flag indicating this component should receive the focus.
272      <br />Default: <code>false</code>
273      */
274      public boolean isFocus() {
275        if (focus != null) {
276          return focus;
277        }
278        ValueExpression ve = getValueExpression("focus");
279        if (ve != null) {
280          try {
281            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
282            if (bool != null) {
283              return bool;
284            }
285          } catch (ELException e) {
286                      throw new FacesException(e);
287              }
288        }
289        return false;
290      }
291    
292      public void setFocus(boolean focus) {
293        this.focus = focus;
294      }
295    
296      /**
297      This value will usually be set by the layout manager.
298    
299      */
300      public org.apache.myfaces.tobago.layout.Measure getLeft() {
301        if (left != null) {
302          return left;
303        }
304        ValueExpression ve = getValueExpression("left");
305        if (ve != null) {
306          try {
307            Object object = ve.getValue(getFacesContext().getELContext());
308            return Measure.valueOf(object);
309          } catch (ELException e) {
310                      throw new FacesException(e);
311              }
312        }
313        return null;
314      }
315    
316      public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
317        this.left = left;
318      }
319    
320      public java.lang.Integer getColumnSpan() {
321        if (columnSpan != null) {
322          return columnSpan;
323        }
324        ValueExpression ve = getValueExpression("columnSpan");
325        if (ve != null) {
326          try {
327            Number number = (Number) ve.getValue(getFacesContext().getELContext());
328            if (number != null) {
329              return number.intValue();
330            }
331          } catch (ELException e) {
332                      throw new FacesException(e);
333              }
334        }
335        return 1;
336      }
337    
338      public void setColumnSpan(java.lang.Integer columnSpan) {
339        this.columnSpan = columnSpan;
340      }
341    
342      /**
343      Flag indicating that a value is required.
344       If the value is an empty string a
345       ValidationError occurs and a Error Message is rendered.
346      <br />Default: <code>false</code>
347      */
348      public boolean isRequired() {
349        if (required != null) {
350          return required;
351        }
352        ValueExpression ve = getValueExpression("required");
353        if (ve != null) {
354          try {
355            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
356            if (bool != null) {
357              return bool;
358            }
359          } catch (ELException e) {
360                      throw new FacesException(e);
361              }
362        }
363        return false;
364      }
365    
366      public void setRequired(boolean required) {
367        this.required = required;
368      }
369    
370      /**
371      This value will usually be set by the layout manager.
372    
373      */
374      public org.apache.myfaces.tobago.layout.Measure getTop() {
375        if (top != null) {
376          return top;
377        }
378        ValueExpression ve = getValueExpression("top");
379        if (ve != null) {
380          try {
381            Object object = ve.getValue(getFacesContext().getELContext());
382            return Measure.valueOf(object);
383          } catch (ELException e) {
384                      throw new FacesException(e);
385              }
386        }
387        return null;
388      }
389    
390      public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
391        this.top = top;
392      }
393    
394      public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
395        if (maximumHeight != null) {
396          return maximumHeight;
397        }
398        ValueExpression ve = getValueExpression("maximumHeight");
399        if (ve != null) {
400          try {
401            Object object = ve.getValue(getFacesContext().getELContext());
402            return Measure.valueOf(object);
403          } catch (ELException e) {
404                      throw new FacesException(e);
405              }
406        }
407        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this);
408      }
409    
410      public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
411        this.maximumHeight = maximumHeight;
412      }
413    
414      /**
415      This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
416    
417      */
418      public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
419        if (currentWidth != null) {
420          return currentWidth;
421        }
422        ValueExpression ve = getValueExpression("currentWidth");
423        if (ve != null) {
424          try {
425            Object object = ve.getValue(getFacesContext().getELContext());
426            return Measure.valueOf(object);
427          } catch (ELException e) {
428                      throw new FacesException(e);
429              }
430        }
431        return getWidth();
432      }
433    
434      public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
435        this.currentWidth = currentWidth;
436      }
437    
438      public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
439        if (marginTop != null) {
440          return marginTop;
441        }
442        ValueExpression ve = getValueExpression("marginTop");
443        if (ve != null) {
444          try {
445            Object object = ve.getValue(getFacesContext().getELContext());
446            return Measure.valueOf(object);
447          } catch (ELException e) {
448                      throw new FacesException(e);
449              }
450        }
451        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this);
452      }
453    
454      public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
455        this.marginTop = marginTop;
456      }
457    
458      /**
459      This value will usually be set by the layout manager.
460    
461      */
462      public org.apache.myfaces.tobago.layout.Measure getWidth() {
463        if (width != null) {
464          return width;
465        }
466        ValueExpression ve = getValueExpression("width");
467        if (ve != null) {
468          try {
469            Object object = ve.getValue(getFacesContext().getELContext());
470            return Measure.valueOf(object);
471          } catch (ELException e) {
472                      throw new FacesException(e);
473              }
474        }
475        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this);
476      }
477    
478      public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
479        this.width = width;
480      }
481    
482      public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
483        if (marginRight != null) {
484          return marginRight;
485        }
486        ValueExpression ve = getValueExpression("marginRight");
487        if (ve != null) {
488          try {
489            Object object = ve.getValue(getFacesContext().getELContext());
490            return Measure.valueOf(object);
491          } catch (ELException e) {
492                      throw new FacesException(e);
493              }
494        }
495        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this);
496      }
497    
498      public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
499        this.marginRight = marginRight;
500      }
501    
502      public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
503        if (preferredHeight != null) {
504          return preferredHeight;
505        }
506        ValueExpression ve = getValueExpression("preferredHeight");
507        if (ve != null) {
508          try {
509            Object object = ve.getValue(getFacesContext().getELContext());
510            return Measure.valueOf(object);
511          } catch (ELException e) {
512                      throw new FacesException(e);
513              }
514        }
515        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this);
516      }
517    
518      public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
519        this.preferredHeight = preferredHeight;
520      }
521    
522      /**
523      This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
524    
525      */
526      public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
527        if (currentHeight != null) {
528          return currentHeight;
529        }
530        ValueExpression ve = getValueExpression("currentHeight");
531        if (ve != null) {
532          try {
533            Object object = ve.getValue(getFacesContext().getELContext());
534            return Measure.valueOf(object);
535          } catch (ELException e) {
536                      throw new FacesException(e);
537              }
538        }
539        return getHeight();
540      }
541    
542      public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
543        this.currentHeight = currentHeight;
544      }
545    
546      /**
547      This attribute is for internal use only.
548    
549      */
550      public org.apache.myfaces.tobago.layout.Display getDisplay() {
551        if (display != null) {
552          return display;
553        }
554        ValueExpression ve = getValueExpression("display");
555        if (ve != null) {
556          try {
557            return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext());
558          } catch (ELException e) {
559                      throw new FacesException(e);
560              }
561        }
562        return null;
563      }
564    
565      public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
566        this.display = display;
567      }
568    
569      public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
570        if (maximumWidth != null) {
571          return maximumWidth;
572        }
573        ValueExpression ve = getValueExpression("maximumWidth");
574        if (ve != null) {
575          try {
576            Object object = ve.getValue(getFacesContext().getELContext());
577            return Measure.valueOf(object);
578          } catch (ELException e) {
579                      throw new FacesException(e);
580              }
581        }
582        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this);
583      }
584    
585      public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
586        this.maximumWidth = maximumWidth;
587      }
588    
589      /**
590      Clientside script function to add to this component's onchange handler.
591    
592      */
593      public java.lang.String getOnchange() {
594        if (onchange != null) {
595          return onchange;
596        }
597        ValueExpression ve = getValueExpression("onchange");
598        if (ve != null) {
599          try {
600            return (java.lang.String) ve.getValue(getFacesContext().getELContext());
601          } catch (ELException e) {
602                      throw new FacesException(e);
603              }
604        }
605        return null;
606      }
607    
608      public void setOnchange(java.lang.String onchange) {
609        this.onchange = onchange;
610      }
611    
612      public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
613        if (preferredWidth != null) {
614          return preferredWidth;
615        }
616        ValueExpression ve = getValueExpression("preferredWidth");
617        if (ve != null) {
618          try {
619            Object object = ve.getValue(getFacesContext().getELContext());
620            return Measure.valueOf(object);
621          } catch (ELException e) {
622                      throw new FacesException(e);
623              }
624        }
625        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this);
626      }
627    
628      public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
629        this.preferredWidth = preferredWidth;
630      }
631    
632      public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
633        if (marginBottom != null) {
634          return marginBottom;
635        }
636        ValueExpression ve = getValueExpression("marginBottom");
637        if (ve != null) {
638          try {
639            Object object = ve.getValue(getFacesContext().getELContext());
640            return Measure.valueOf(object);
641          } catch (ELException e) {
642                      throw new FacesException(e);
643              }
644        }
645        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this);
646      }
647    
648      public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
649        this.marginBottom = marginBottom;
650      }
651    
652      /**
653      Range of items to render.
654    
655      */
656      public java.lang.String getRenderRange() {
657        if (renderRange != null) {
658          return renderRange;
659        }
660        ValueExpression ve = getValueExpression("renderRange");
661        if (ve != null) {
662          try {
663            return (java.lang.String) ve.getValue(getFacesContext().getELContext());
664          } catch (ELException e) {
665                      throw new FacesException(e);
666              }
667        }
668        return null;
669      }
670    
671      public void setRenderRange(java.lang.String renderRange) {
672        this.renderRange = renderRange;
673      }
674    
675      /**
676      This attribute is for internal use only.
677    
678      */
679      public java.lang.Integer getVerticalIndex() {
680        if (verticalIndex != null) {
681          return verticalIndex;
682        }
683        ValueExpression ve = getValueExpression("verticalIndex");
684        if (ve != null) {
685          try {
686            Number number = (Number) ve.getValue(getFacesContext().getELContext());
687            if (number != null) {
688              return number.intValue();
689            }
690          } catch (ELException e) {
691                      throw new FacesException(e);
692              }
693        }
694        return null;
695      }
696    
697      public void setVerticalIndex(java.lang.Integer verticalIndex) {
698        this.verticalIndex = verticalIndex;
699      }
700    
701      public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
702        if (currentMarkup != null) {
703          return currentMarkup;
704        }
705        ValueExpression ve = getValueExpression("currentMarkup");
706        if (ve != null) {
707          try {
708            Object object = ve.getValue(getFacesContext().getELContext());
709            return Markup.valueOf(object);
710          } catch (ELException e) {
711                      throw new FacesException(e);
712              }
713        }
714        return null;
715      }
716    
717      public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
718        this.currentMarkup = currentMarkup;
719      }
720    
721      /**
722      This attribute is for internal use only.
723    
724      */
725      public java.lang.Integer getHorizontalIndex() {
726        if (horizontalIndex != null) {
727          return horizontalIndex;
728        }
729        ValueExpression ve = getValueExpression("horizontalIndex");
730        if (ve != null) {
731          try {
732            Number number = (Number) ve.getValue(getFacesContext().getELContext());
733            if (number != null) {
734              return number.intValue();
735            }
736          } catch (ELException e) {
737                      throw new FacesException(e);
738              }
739        }
740        return null;
741      }
742    
743      public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
744        this.horizontalIndex = horizontalIndex;
745      }
746    
747      /**
748      Flag indicating that this component will prohibit changes by the user.
749      <br />Default: <code>false</code>
750      */
751      public boolean isReadonly() {
752        if (readonly != null) {
753          return readonly;
754        }
755        ValueExpression ve = getValueExpression("readonly");
756        if (ve != null) {
757          try {
758            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
759            if (bool != null) {
760              return bool;
761            }
762          } catch (ELException e) {
763                      throw new FacesException(e);
764              }
765        }
766        return false;
767      }
768    
769      public void setReadonly(boolean readonly) {
770        this.readonly = readonly;
771      }
772    
773      /**
774      Flag indicating that this element is disabled.
775      <br />Default: <code>false</code>
776      */
777      public boolean isDisabled() {
778        if (disabled != null) {
779          return disabled;
780        }
781        ValueExpression ve = getValueExpression("disabled");
782        if (ve != null) {
783          try {
784            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
785            if (bool != null) {
786              return bool;
787            }
788          } catch (ELException e) {
789                      throw new FacesException(e);
790              }
791        }
792        return false;
793      }
794    
795      public void setDisabled(boolean disabled) {
796        this.disabled = disabled;
797      }
798    
799      public void restoreState(FacesContext context, Object componentState) {
800        Object[] values = (Object[]) componentState;
801        super.restoreState(context, values[0]);
802        markup = (org.apache.myfaces.tobago.context.Markup) values[1];
803        marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2];
804        tabIndex = (java.lang.Integer) values[3];
805        minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[4];
806        height = (org.apache.myfaces.tobago.layout.Measure) values[5];
807        minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[6];
808        inline = (java.lang.Boolean) values[7];
809        rowSpan = (java.lang.Integer) values[8];
810        focus = (java.lang.Boolean) values[9];
811        left = (org.apache.myfaces.tobago.layout.Measure) values[10];
812        columnSpan = (java.lang.Integer) values[11];
813        required = (java.lang.Boolean) values[12];
814        top = (org.apache.myfaces.tobago.layout.Measure) values[13];
815        maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[14];
816        currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[15];
817        marginTop = (org.apache.myfaces.tobago.layout.Measure) values[16];
818        width = (org.apache.myfaces.tobago.layout.Measure) values[17];
819        marginRight = (org.apache.myfaces.tobago.layout.Measure) values[18];
820        preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[19];
821        currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[20];
822        display = (org.apache.myfaces.tobago.layout.Display) values[21];
823        maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[22];
824        onchange = (java.lang.String) values[23];
825        preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[24];
826        marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[25];
827        renderRange = (java.lang.String) values[26];
828        verticalIndex = (java.lang.Integer) values[27];
829        currentMarkup = (org.apache.myfaces.tobago.context.Markup) values[28];
830        horizontalIndex = (java.lang.Integer) values[29];
831        readonly = (java.lang.Boolean) values[30];
832        disabled = (java.lang.Boolean) values[31];
833      }
834    
835      public Object saveState(FacesContext context) {
836        Object[] values = new Object[32];
837        values[0] = super.saveState(context);
838        values[1] = markup;
839        values[2] = marginLeft;
840        values[3] = tabIndex;
841        values[4] = minimumHeight;
842        values[5] = height;
843        values[6] = minimumWidth;
844        values[7] = inline;
845        values[8] = rowSpan;
846        values[9] = focus;
847        values[10] = left;
848        values[11] = columnSpan;
849        values[12] = required;
850        values[13] = top;
851        values[14] = maximumHeight;
852        values[15] = currentWidth;
853        values[16] = marginTop;
854        values[17] = width;
855        values[18] = marginRight;
856        values[19] = preferredHeight;
857        values[20] = currentHeight;
858        values[21] = display;
859        values[22] = maximumWidth;
860        values[23] = onchange;
861        values[24] = preferredWidth;
862        values[25] = marginBottom;
863        values[26] = renderRange;
864        values[27] = verticalIndex;
865        values[28] = currentMarkup;
866        values[29] = horizontalIndex;
867        values[30] = readonly;
868        values[31] = disabled;
869        return values;
870      }
871    
872    
873    }