View Javadoc

1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.el.MethodExpression;
23  import javax.faces.component.ActionSource2;
24  import javax.faces.context.FacesContext;
25  import org.apache.myfaces.tobago.context.Markup;
26  import org.apache.myfaces.tobago.internal.component.AbstractUITabGroup;
27  import org.apache.myfaces.tobago.layout.Display;
28  import org.apache.myfaces.tobago.layout.Measure;
29  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
30  import org.apache.myfaces.tobago.internal.util.StringUtils;
31  import org.apache.myfaces.tobago.internal.util.Deprecation;
32  import org.apache.myfaces.tobago.renderkit.MarginValues;
33  import org.apache.myfaces.tobago.renderkit.SpacingValues;
34  import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
35  import javax.el.ELException;
36  import javax.faces.FacesException;
37  import java.util.ArrayList;
38  import java.util.List;
39  import javax.el.MethodExpression;
40  import javax.el.ValueExpression;
41  
42  /** 
43   Renders a tab group which contains tab panels.
44    * UIComponent class, generated from template {@code component2.0.stg} with class
45    * {@link org.apache.myfaces.tobago.internal.taglib.component.TabGroupTagDeclaration}.
46   */
47  public class UITabGroup
48      extends AbstractUITabGroup implements ActionSource2, SupportsMarkup {
49  
50    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TabGroup";
51  
52    public static final String COMPONENT_FAMILY = "javax.faces.Panel";
53  
54    private org.apache.myfaces.tobago.context.Markup currentMarkup;
55  
56    enum PropertyKeys {
57      actionListener,
58      markup,
59      renderedIndex,
60      marginLeft,
61      minimumHeight,
62      borderLeft,
63      height,
64      minimumWidth,
65      overflowX,
66      rowSpan,
67      action,
68      overflowY,
69      left,
70      columnSpan,
71      borderRight,
72      showNavigationBar,
73      paddingBottom,
74      tabChangeListener,
75      maximumHeight,
76      top,
77      currentWidth,
78      selectedIndex,
79      paddingTop,
80      marginTop,
81      width,
82      marginRight,
83      currentHeight,
84      preferredHeight,
85      borderBottom,
86      display,
87      maximumWidth,
88      paddingLeft,
89      paddingRight,
90      preferredWidth,
91      switchType,
92      immediate,
93      marginBottom,
94      borderTop,
95      verticalIndex,
96      renderedPartially,
97      horizontalIndex,
98    }
99  
100   public String getFamily() {
101     return COMPONENT_FAMILY;
102   }
103 
104 
105   /**
106    * @deprecated since 2.0.0
107    */
108   @Deprecated
109   public javax.faces.el.MethodBinding getActionListener() {
110     javax.el.MethodExpression expression = getActionListenerExpression();
111     if (expression instanceof MethodBindingToMethodExpression) {
112       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
113     }
114     if (expression != null) {
115        return new MethodExpressionToMethodBinding(expression);
116     }
117     return null;
118   }
119 
120   /**
121    * @deprecated since 2.0.0
122    */
123   @Deprecated
124   public void setActionListener(javax.faces.el.MethodBinding actionListener) {
125     if (actionListener != null) {
126       setActionListenerExpression(new MethodBindingToMethodExpression(actionListener));
127     } else {
128       setActionListenerExpression(null);
129     }
130   }
131 
132   public javax.el.MethodExpression getActionListenerExpression() {
133     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.actionListener);
134   }
135 
136   public void setActionListenerExpression(javax.el.MethodExpression actionListener) {
137     getStateHelper().put(PropertyKeys.actionListener, actionListener);
138   }
139 
140 
141   public org.apache.myfaces.tobago.context.Markup getMarkup() {
142     Object object = getStateHelper().eval(PropertyKeys.markup);
143     if (object != null) {
144       return Markup.valueOf(object);
145     }
146     return null;
147   }
148 
149   public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
150     getStateHelper().put(PropertyKeys.markup, markup);
151   }
152 
153   /**
154   For internal use. TODO: Check if this long needed
155   <br />Default: <code>0</code>
156   */
157   public java.lang.Integer getRenderedIndex() {
158     Number value  = (Number) getStateHelper().eval(PropertyKeys.renderedIndex);
159     if (value != null) {
160       return value.intValue();
161     }
162     return 0;
163   }
164 
165   public void setRenderedIndex(java.lang.Integer renderedIndex) {
166     getStateHelper().put(PropertyKeys.renderedIndex, renderedIndex);
167   }
168 
169   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
170     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
171     if (object != null) {
172        return Measure.valueOf(object);
173     }
174     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this) : Measure.ZERO;
175   }
176 
177   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
178     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
179   }
180 
181   public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
182     Object object = getStateHelper().eval(PropertyKeys.minimumHeight);
183     if (object != null) {
184        return Measure.valueOf(object);
185     }
186     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this) : Measure.ZERO;
187   }
188 
189   public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
190     getStateHelper().put(PropertyKeys.minimumHeight, minimumHeight);
191   }
192 
193   /**
194   This attribute is for internal use only.
195 
196   */
197   public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
198     Object object = getStateHelper().eval(PropertyKeys.borderLeft);
199     if (object != null) {
200        return Measure.valueOf(object);
201     }
202     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
203    getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this) : Measure.ZERO;
204   }
205 
206   public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
207     getStateHelper().put(PropertyKeys.borderLeft, borderLeft);
208   }
209 
210   /**
211   This value will usually be set by the layout manager.
212 
213   */
214   public org.apache.myfaces.tobago.layout.Measure getHeight() {
215     Object object = getStateHelper().eval(PropertyKeys.height);
216     if (object != null) {
217        return Measure.valueOf(object);
218     }
219     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this) : Measure.ZERO;
220   }
221 
222   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
223     getStateHelper().put(PropertyKeys.height, height);
224   }
225 
226   public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
227     Object object = getStateHelper().eval(PropertyKeys.minimumWidth);
228     if (object != null) {
229        return Measure.valueOf(object);
230     }
231     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this) : Measure.ZERO;
232   }
233 
234   public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
235     getStateHelper().put(PropertyKeys.minimumWidth, minimumWidth);
236   }
237 
238   /**
239   This attribute is for internal use only.
240 
241   */
242   public boolean isOverflowX() {
243     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowX);
244     if (bool != null) {
245       return bool;
246     }
247     return false;
248   }
249 
250   public void setOverflowX(boolean overflowX) {
251     getStateHelper().put(PropertyKeys.overflowX, overflowX);
252   }
253 
254   public java.lang.Integer getRowSpan() {
255     Number value  = (Number) getStateHelper().eval(PropertyKeys.rowSpan);
256     if (value != null) {
257       return value.intValue();
258     }
259     return 1;
260   }
261 
262   public void setRowSpan(java.lang.Integer rowSpan) {
263     getStateHelper().put(PropertyKeys.rowSpan, rowSpan);
264   }
265 
266   /**
267    * @deprecated since 2.0.0
268    */
269   @Deprecated
270   public javax.faces.el.MethodBinding getAction() {
271     javax.el.MethodExpression expression = getActionExpression();
272     if (expression instanceof MethodBindingToMethodExpression) {
273       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
274     }
275     if (expression != null) {
276        return new MethodExpressionToMethodBinding(expression);
277     }
278     return null;
279   }
280 
281   /**
282    * @deprecated since 2.0.0
283    */
284   @Deprecated
285   public void setAction(javax.faces.el.MethodBinding action) {
286     if (action != null) {
287       setActionExpression(new MethodBindingToMethodExpression(action));
288     } else {
289       setActionExpression(null);
290     }
291   }
292 
293   public javax.el.MethodExpression getActionExpression() {
294     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.action);
295   }
296 
297   public void setActionExpression(javax.el.MethodExpression action) {
298     getStateHelper().put(PropertyKeys.action, action);
299   }
300 
301 
302   /**
303   This attribute is for internal use only.
304 
305   */
306   public boolean isOverflowY() {
307     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowY);
308     if (bool != null) {
309       return bool;
310     }
311     return false;
312   }
313 
314   public void setOverflowY(boolean overflowY) {
315     getStateHelper().put(PropertyKeys.overflowY, overflowY);
316   }
317 
318   /**
319   This value will usually be set by the layout manager.
320 
321   */
322   public org.apache.myfaces.tobago.layout.Measure getLeft() {
323     Object object = getStateHelper().eval(PropertyKeys.left);
324     if (object != null) {
325        return Measure.valueOf(object);
326     }
327     return null;
328   }
329 
330   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
331     getStateHelper().put(PropertyKeys.left, left);
332   }
333 
334   public java.lang.Integer getColumnSpan() {
335     Number value  = (Number) getStateHelper().eval(PropertyKeys.columnSpan);
336     if (value != null) {
337       return value.intValue();
338     }
339     return 1;
340   }
341 
342   public void setColumnSpan(java.lang.Integer columnSpan) {
343     getStateHelper().put(PropertyKeys.columnSpan, columnSpan);
344   }
345 
346   /**
347   This attribute is for internal use only.
348 
349   */
350   public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
351     Object object = getStateHelper().eval(PropertyKeys.borderRight);
352     if (object != null) {
353        return Measure.valueOf(object);
354     }
355     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
356   getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this) : Measure.ZERO;
357   }
358 
359   public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
360     getStateHelper().put(PropertyKeys.borderRight, borderRight);
361   }
362 
363   /**
364   Flag indicating that the tab navigation bar is rendered.
365   <br />Default: <code>true</code>
366   */
367   public boolean isShowNavigationBar() {
368     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showNavigationBar);
369     if (bool != null) {
370       return bool;
371     }
372     return true;
373   }
374 
375   public void setShowNavigationBar(boolean showNavigationBar) {
376     getStateHelper().put(PropertyKeys.showNavigationBar, showNavigationBar);
377   }
378 
379   /**
380   This attribute is for internal use only.
381 
382   */
383   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
384     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
385     if (object != null) {
386        return Measure.valueOf(object);
387     }
388     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
389   getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this) : Measure.ZERO;
390   }
391 
392   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
393     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
394   }
395 
396   /**
397    * @deprecated since 2.0.0
398    */
399   @Deprecated
400   public javax.faces.el.MethodBinding getTabChangeListener() {
401     javax.el.MethodExpression expression = getTabChangeListenerExpression();
402     if (expression instanceof MethodBindingToMethodExpression) {
403       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
404     }
405     if (expression != null) {
406        return new MethodExpressionToMethodBinding(expression);
407     }
408     return null;
409   }
410 
411   /**
412    * @deprecated since 2.0.0
413    */
414   @Deprecated
415   public void setTabChangeListener(javax.faces.el.MethodBinding tabChangeListener) {
416     if (tabChangeListener != null) {
417       setTabChangeListenerExpression(new MethodBindingToMethodExpression(tabChangeListener));
418     } else {
419       setTabChangeListenerExpression(null);
420     }
421   }
422 
423   public javax.el.MethodExpression getTabChangeListenerExpression() {
424     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.tabChangeListener);
425   }
426 
427   public void setTabChangeListenerExpression(javax.el.MethodExpression tabChangeListener) {
428     getStateHelper().put(PropertyKeys.tabChangeListener, tabChangeListener);
429   }
430 
431 
432   public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
433     Object object = getStateHelper().eval(PropertyKeys.maximumHeight);
434     if (object != null) {
435        return Measure.valueOf(object);
436     }
437     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this) : Measure.ZERO;
438   }
439 
440   public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
441     getStateHelper().put(PropertyKeys.maximumHeight, maximumHeight);
442   }
443 
444   /**
445   This value will usually be set by the layout manager.
446 
447   */
448   public org.apache.myfaces.tobago.layout.Measure getTop() {
449     Object object = getStateHelper().eval(PropertyKeys.top);
450     if (object != null) {
451        return Measure.valueOf(object);
452     }
453     return null;
454   }
455 
456   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
457     getStateHelper().put(PropertyKeys.top, top);
458   }
459 
460   /**
461   This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
462 
463   */
464   public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
465     Object object = getStateHelper().eval(PropertyKeys.currentWidth);
466     if (object != null) {
467        return Measure.valueOf(object);
468     }
469     return getWidth();
470   }
471 
472   public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
473     getStateHelper().put(PropertyKeys.currentWidth, currentWidth);
474   }
475 
476   /**
477   <strong>ValueBindingExpression</strong> pointing to a Integer to save the
478    component's selected Tab.
479   <br />Default: <code>0</code>
480   */
481   public java.lang.Integer getSelectedIndex() {
482     Number value  = (Number) getStateHelper().eval(PropertyKeys.selectedIndex);
483     if (value != null) {
484       return value.intValue();
485     }
486     return 0;
487   }
488 
489   public void setSelectedIndex(java.lang.Integer selectedIndex) {
490     getStateHelper().put(PropertyKeys.selectedIndex, selectedIndex);
491   }
492 
493   /**
494   This attribute is for internal use only.
495 
496   */
497   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
498     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
499     if (object != null) {
500        return Measure.valueOf(object);
501     }
502     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
503   getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this) : Measure.ZERO;
504   }
505 
506   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
507     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
508   }
509 
510   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
511     Object object = getStateHelper().eval(PropertyKeys.marginTop);
512     if (object != null) {
513        return Measure.valueOf(object);
514     }
515     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this) : Measure.ZERO;
516   }
517 
518   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
519     getStateHelper().put(PropertyKeys.marginTop, marginTop);
520   }
521 
522   /**
523   This value will usually be set by the layout manager.
524 
525   */
526   public org.apache.myfaces.tobago.layout.Measure getWidth() {
527     Object object = getStateHelper().eval(PropertyKeys.width);
528     if (object != null) {
529        return Measure.valueOf(object);
530     }
531     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this) : Measure.ZERO;
532   }
533 
534   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
535     getStateHelper().put(PropertyKeys.width, width);
536   }
537 
538   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
539     Object object = getStateHelper().eval(PropertyKeys.marginRight);
540     if (object != null) {
541        return Measure.valueOf(object);
542     }
543     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this) : Measure.ZERO;
544   }
545 
546   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
547     getStateHelper().put(PropertyKeys.marginRight, marginRight);
548   }
549 
550   /**
551   This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
552 
553   */
554   public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
555     Object object = getStateHelper().eval(PropertyKeys.currentHeight);
556     if (object != null) {
557        return Measure.valueOf(object);
558     }
559     return getHeight();
560   }
561 
562   public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
563     getStateHelper().put(PropertyKeys.currentHeight, currentHeight);
564   }
565 
566   public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
567     Object object = getStateHelper().eval(PropertyKeys.preferredHeight);
568     if (object != null) {
569        return Measure.valueOf(object);
570     }
571     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this) : Measure.ZERO;
572   }
573 
574   public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
575     getStateHelper().put(PropertyKeys.preferredHeight, preferredHeight);
576   }
577 
578   /**
579   This attribute is for internal use only.
580 
581   */
582   public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
583     Object object = getStateHelper().eval(PropertyKeys.borderBottom);
584     if (object != null) {
585        return Measure.valueOf(object);
586     }
587     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
588   getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this) : Measure.ZERO;
589   }
590 
591   public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
592     getStateHelper().put(PropertyKeys.borderBottom, borderBottom);
593   }
594 
595   /**
596   This attribute is for internal use only.
597 
598   */
599   public org.apache.myfaces.tobago.layout.Display getDisplay() {
600     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
601   }
602 
603   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
604     getStateHelper().put(PropertyKeys.display, display);
605   }
606 
607   public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
608     Object object = getStateHelper().eval(PropertyKeys.maximumWidth);
609     if (object != null) {
610        return Measure.valueOf(object);
611     }
612     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this) : Measure.ZERO;
613   }
614 
615   public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
616     getStateHelper().put(PropertyKeys.maximumWidth, maximumWidth);
617   }
618 
619   /**
620   This attribute is for internal use only.
621 
622   */
623   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
624     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
625     if (object != null) {
626        return Measure.valueOf(object);
627     }
628     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
629   getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this) : Measure.ZERO;
630   }
631 
632   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
633     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
634   }
635 
636   /**
637   This attribute is for internal use only.
638 
639   */
640   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
641     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
642     if (object != null) {
643        return Measure.valueOf(object);
644     }
645     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
646   getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this) : Measure.ZERO;
647   }
648 
649   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
650     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
651   }
652 
653   public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
654     Object object = getStateHelper().eval(PropertyKeys.preferredWidth);
655     if (object != null) {
656        return Measure.valueOf(object);
657     }
658     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this) : Measure.ZERO;
659   }
660 
661   public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
662     getStateHelper().put(PropertyKeys.preferredWidth, preferredWidth);
663   }
664 
665   /**
666   Indicating how tab switching should be done.
667    <p/>
668    Possible values are:
669    <dl>
670      <dt>client</dt>
671      <dd>Tab switching is done on client, no server Request.</dd>
672      <dt>reloadPage</dt>
673      <dd>Tab switching is done by server request. Full page is reloaded.</dd>
674      <dt>reloadTab</dt>
675      <dd>Tab switching is done by server request. Only the Tab is reloaded.</dd>
676    </dl>
677   <br />Default: <code>client</code><br />Allowed Values: <code>client,reloadPage,reloadTab</code>
678   */
679   public java.lang.String getSwitchType() {
680     java.lang.String switchType = (java.lang.String) getStateHelper().eval(PropertyKeys.switchType);
681     if (switchType != null) {
682       return switchType;
683     }
684     return "client";
685   }
686 
687   public void setSwitchType(java.lang.String switchType) {
688     getStateHelper().put(PropertyKeys.switchType, switchType);
689   }
690 
691   /**
692   Flag indicating that, if this component is activated by the user,
693    notifications should be delivered to interested listeners and actions
694    immediately (that is, during Apply Request Values phase) rather than
695    waiting until Invoke Application phase.
696   <br />Default: <code>false</code>
697   */
698   public boolean isImmediate() {
699     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.immediate);
700     if (bool != null) {
701       return bool;
702     }
703     return false;
704   }
705 
706   public void setImmediate(boolean immediate) {
707     getStateHelper().put(PropertyKeys.immediate, immediate);
708   }
709 
710   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
711     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
712     if (object != null) {
713        return Measure.valueOf(object);
714     }
715     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this) : Measure.ZERO;
716   }
717 
718   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
719     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
720   }
721 
722   /**
723   This attribute is for internal use only.
724 
725   */
726   public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
727     Object object = getStateHelper().eval(PropertyKeys.borderTop);
728     if (object != null) {
729        return Measure.valueOf(object);
730     }
731     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
732   getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this) : Measure.ZERO;
733   }
734 
735   public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
736     getStateHelper().put(PropertyKeys.borderTop, borderTop);
737   }
738 
739   /**
740   This attribute is for internal use only.
741 
742   */
743   public java.lang.Integer getVerticalIndex() {
744     Number value  = (Number) getStateHelper().eval(PropertyKeys.verticalIndex);
745     if (value != null) {
746       return value.intValue();
747     }
748     return null;
749   }
750 
751   public void setVerticalIndex(java.lang.Integer verticalIndex) {
752     getStateHelper().put(PropertyKeys.verticalIndex, verticalIndex);
753   }
754 
755   /**
756   <p>
757    Indicate the partially rendered Components in a case of a submit.
758    </p>
759    <p>
760    The search depends on the number of prefixed colons in the relativeId:
761    <dl>
762      <dd>colonCount == 0</dd>
763      <dt>fully relative</dt>
764      <dd>colonCount == 1</dd>
765      <dt>absolute (still normal findComponent syntax)</dt>
766      <dd>colonCount > 1</dd>
767      <dt>for each extra colon after 1, go up a naming container</dt>
768    </dl>
769    </p>
770    <p>
771    If a literal is specified the identifiers must be space delimited.
772    </p>
773 
774   */
775   public String[] getRenderedPartially() {
776     Object strArray = getStateHelper().eval(PropertyKeys.renderedPartially);
777     if (strArray != null) {
778       if (strArray instanceof String[]) {
779         return (String[]) strArray;
780       } else if (strArray instanceof String) {
781         String[] strings = StringUtils.split((String) strArray, ", ");
782         List<String> result = new ArrayList<String>(strings.length);
783         for (String string : strings) {
784           if (string.trim().length() != 0) {
785             result.add(string.trim());
786           }
787         }
788         return result.toArray(new String[result.size()]);
789       } else if (strArray == null) {
790         return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
791       } else {
792         return new String[]{strArray.toString()};
793       }
794     }
795     return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
796   }
797 
798   public void setRenderedPartially(String[] renderedPartially) {
799     getStateHelper().put(PropertyKeys.renderedPartially, renderedPartially);
800   }
801 
802   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
803     if (currentMarkup != null) {
804       return currentMarkup;
805     }
806     return null;
807   }
808 
809   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
810     this.currentMarkup = currentMarkup;
811   }
812 
813   /**
814   This attribute is for internal use only.
815 
816   */
817   public java.lang.Integer getHorizontalIndex() {
818     Number value  = (Number) getStateHelper().eval(PropertyKeys.horizontalIndex);
819     if (value != null) {
820       return value.intValue();
821     }
822     return null;
823   }
824 
825   public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
826     getStateHelper().put(PropertyKeys.horizontalIndex, horizontalIndex);
827   }
828 
829   public Object saveState(FacesContext context) {
830     currentMarkup = null;
831     return super.saveState(context);
832   }
833 
834 }