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.context.FacesContext;
24  import org.apache.myfaces.tobago.context.Markup;
25  import org.apache.myfaces.tobago.event.SortActionSource2;
26  import org.apache.myfaces.tobago.internal.component.AbstractUISheet;
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   Render a sheet element.
44    * UIComponent class, generated from template {@code component2.0.stg} with class
45    * {@link org.apache.myfaces.tobago.internal.taglib.component.SheetTagDeclaration}.
46   */
47  public class UISheet
48      extends AbstractUISheet implements SortActionSource2, SupportsMarkup {
49  
50    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Sheet";
51  
52    public static final String COMPONENT_FAMILY = "javax.faces.Data";
53  
54    private org.apache.myfaces.tobago.context.Markup currentMarkup;
55  
56    enum PropertyKeys {
57      markup,
58      marginLeft,
59      columns,
60      borderLeft,
61      height,
62      minimumWidth,
63      showDirectLinks,
64      showPageRange,
65      overflowX,
66      overflowY,
67      forceVerticalScrollbar,
68      stateChangeListener,
69      borderRight,
70      maximumHeight,
71      currentWidth,
72      paddingTop,
73      marginTop,
74      width,
75      currentHeight,
76      display,
77      borderBottom,
78      showRootJunction,
79      paddingLeft,
80      preferredWidth,
81      borderTop,
82      verticalIndex,
83      showPagingAlways,
84      renderedPartially,
85      minimumHeight,
86      showPageRangeArrows,
87      showRoot,
88      rowSpan,
89      left,
90      columnSpan,
91      paddingBottom,
92      top,
93      showDirectLinksArrows,
94      showRowRange,
95      marginRight,
96      preferredHeight,
97      maximumWidth,
98      paddingRight,
99      marginBottom,
100     selectable,
101     showHeader,
102     directLinkCount,
103     sortActionListener,
104     horizontalIndex,
105   }
106 
107   public String getFamily() {
108     return COMPONENT_FAMILY;
109   }
110 
111 
112   public org.apache.myfaces.tobago.context.Markup getMarkup() {
113     Object object = getStateHelper().eval(PropertyKeys.markup);
114     if (object != null) {
115       return Markup.valueOf(object);
116     }
117     return null;
118   }
119 
120   public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
121     getStateHelper().put(PropertyKeys.markup, markup);
122   }
123 
124   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
125     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
126     if (object != null) {
127        return Measure.valueOf(object);
128     }
129     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this) : Measure.ZERO;
130   }
131 
132   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
133     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
134   }
135 
136   /**
137   LayoutConstraints for column layout.
138    Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').
139 
140   */
141   public java.lang.String getColumns() {
142     return (java.lang.String) getStateHelper().eval(PropertyKeys.columns);
143   }
144 
145   public void setColumns(java.lang.String columns) {
146     getStateHelper().put(PropertyKeys.columns, columns);
147   }
148 
149   /**
150   This attribute is for internal use only.
151 
152   */
153   public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
154     Object object = getStateHelper().eval(PropertyKeys.borderLeft);
155     if (object != null) {
156        return Measure.valueOf(object);
157     }
158     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
159    getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this) : Measure.ZERO;
160   }
161 
162   public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
163     getStateHelper().put(PropertyKeys.borderLeft, borderLeft);
164   }
165 
166   /**
167   This value will usually be set by the layout manager.
168 
169   */
170   public org.apache.myfaces.tobago.layout.Measure getHeight() {
171     Object object = getStateHelper().eval(PropertyKeys.height);
172     if (object != null) {
173        return Measure.valueOf(object);
174     }
175     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this) : Measure.ZERO;
176   }
177 
178   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
179     getStateHelper().put(PropertyKeys.height, height);
180   }
181 
182   public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
183     Object object = getStateHelper().eval(PropertyKeys.minimumWidth);
184     if (object != null) {
185        return Measure.valueOf(object);
186     }
187     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this) : Measure.ZERO;
188   }
189 
190   public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
191     getStateHelper().put(PropertyKeys.minimumWidth, minimumWidth);
192   }
193 
194   /**
195   Flag indicating whether or not a range of direct paging links should be
196    rendered in the sheet's footer.
197   <br />Default: <code>center</code><br />Allowed Values: <code>left,center,right,none</code>
198   */
199   public java.lang.String getShowDirectLinks() {
200     java.lang.String showDirectLinks = (java.lang.String) getStateHelper().eval(PropertyKeys.showDirectLinks);
201     if (showDirectLinks != null) {
202       return showDirectLinks;
203     }
204     return "center";
205   }
206 
207   public void setShowDirectLinks(java.lang.String showDirectLinks) {
208     getStateHelper().put(PropertyKeys.showDirectLinks, showDirectLinks);
209   }
210 
211   /**
212   Flag indicating whether and where the range pages should
213    rendered in the sheet's footer. Rendering this range also offers the
214    capability to enter the index displayed page directly.
215   <br />Default: <code>right</code><br />Allowed Values: <code>left,center,right,none</code>
216   */
217   public java.lang.String getShowPageRange() {
218     java.lang.String showPageRange = (java.lang.String) getStateHelper().eval(PropertyKeys.showPageRange);
219     if (showPageRange != null) {
220       return showPageRange;
221     }
222     return "right";
223   }
224 
225   public void setShowPageRange(java.lang.String showPageRange) {
226     getStateHelper().put(PropertyKeys.showPageRange, showPageRange);
227   }
228 
229   /**
230   This attribute is for internal use only.
231 
232   */
233   public boolean isOverflowX() {
234     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowX);
235     if (bool != null) {
236       return bool;
237     }
238     return false;
239   }
240 
241   public void setOverflowX(boolean overflowX) {
242     getStateHelper().put(PropertyKeys.overflowX, overflowX);
243   }
244 
245   /**
246   This attribute is for internal use only.
247 
248   */
249   public boolean isOverflowY() {
250     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowY);
251     if (bool != null) {
252       return bool;
253     }
254     return false;
255   }
256 
257   public void setOverflowY(boolean overflowY) {
258     getStateHelper().put(PropertyKeys.overflowY, overflowY);
259   }
260 
261   /**
262   Flag indicating whether or not this sheet should reserve space for
263    vertical toolbar when calculating column width's.<br />
264    Possible values are: <pre>
265         'auto'  : sheet try to estimate the need of scrollbar.
266         'true'  : space for scrollbar is reserved.
267         'false' : no space is reserved.
268         </pre>
269   <br />Default: <code>auto</code><br />Allowed Values: <code>auto,true,false</code>
270   */
271   public java.lang.String getForceVerticalScrollbar() {
272     java.lang.String forceVerticalScrollbar = (java.lang.String) getStateHelper().eval(PropertyKeys.forceVerticalScrollbar);
273     if (forceVerticalScrollbar != null) {
274       return forceVerticalScrollbar;
275     }
276     return "auto";
277   }
278 
279   public void setForceVerticalScrollbar(java.lang.String forceVerticalScrollbar) {
280     getStateHelper().put(PropertyKeys.forceVerticalScrollbar, forceVerticalScrollbar);
281   }
282 
283   /**
284    * @deprecated since 2.0.0
285    */
286   @Deprecated
287   public javax.faces.el.MethodBinding getStateChangeListener() {
288     javax.el.MethodExpression expression = getStateChangeListenerExpression();
289     if (expression instanceof MethodBindingToMethodExpression) {
290       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
291     }
292     if (expression != null) {
293        return new MethodExpressionToMethodBinding(expression);
294     }
295     return null;
296   }
297 
298   /**
299    * @deprecated since 2.0.0
300    */
301   @Deprecated
302   public void setStateChangeListener(javax.faces.el.MethodBinding stateChangeListener) {
303     if (stateChangeListener != null) {
304       setStateChangeListenerExpression(new MethodBindingToMethodExpression(stateChangeListener));
305     } else {
306       setStateChangeListenerExpression(null);
307     }
308   }
309 
310   public javax.el.MethodExpression getStateChangeListenerExpression() {
311     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.stateChangeListener);
312   }
313 
314   public void setStateChangeListenerExpression(javax.el.MethodExpression stateChangeListener) {
315     getStateHelper().put(PropertyKeys.stateChangeListener, stateChangeListener);
316   }
317 
318 
319   /**
320   This attribute is for internal use only.
321 
322   */
323   public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
324     Object object = getStateHelper().eval(PropertyKeys.borderRight);
325     if (object != null) {
326        return Measure.valueOf(object);
327     }
328     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
329   getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this) : Measure.ZERO;
330   }
331 
332   public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
333     getStateHelper().put(PropertyKeys.borderRight, borderRight);
334   }
335 
336   public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
337     Object object = getStateHelper().eval(PropertyKeys.maximumHeight);
338     if (object != null) {
339        return Measure.valueOf(object);
340     }
341     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this) : Measure.ZERO;
342   }
343 
344   public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
345     getStateHelper().put(PropertyKeys.maximumHeight, maximumHeight);
346   }
347 
348   /**
349   This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
350 
351   */
352   public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
353     Object object = getStateHelper().eval(PropertyKeys.currentWidth);
354     if (object != null) {
355        return Measure.valueOf(object);
356     }
357     return getWidth();
358   }
359 
360   public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
361     getStateHelper().put(PropertyKeys.currentWidth, currentWidth);
362   }
363 
364   /**
365   This attribute is for internal use only.
366 
367   */
368   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
369     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
370     if (object != null) {
371        return Measure.valueOf(object);
372     }
373     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
374   getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this) : Measure.ZERO;
375   }
376 
377   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
378     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
379   }
380 
381   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
382     Object object = getStateHelper().eval(PropertyKeys.marginTop);
383     if (object != null) {
384        return Measure.valueOf(object);
385     }
386     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this) : Measure.ZERO;
387   }
388 
389   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
390     getStateHelper().put(PropertyKeys.marginTop, marginTop);
391   }
392 
393   /**
394   This value will usually be set by the layout manager.
395 
396   */
397   public org.apache.myfaces.tobago.layout.Measure getWidth() {
398     Object object = getStateHelper().eval(PropertyKeys.width);
399     if (object != null) {
400        return Measure.valueOf(object);
401     }
402     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this) : Measure.ZERO;
403   }
404 
405   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
406     getStateHelper().put(PropertyKeys.width, width);
407   }
408 
409   /**
410   This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
411 
412   */
413   public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
414     Object object = getStateHelper().eval(PropertyKeys.currentHeight);
415     if (object != null) {
416        return Measure.valueOf(object);
417     }
418     return getHeight();
419   }
420 
421   public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
422     getStateHelper().put(PropertyKeys.currentHeight, currentHeight);
423   }
424 
425   /**
426   This attribute is for internal use only.
427 
428   */
429   public org.apache.myfaces.tobago.layout.Display getDisplay() {
430     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
431   }
432 
433   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
434     getStateHelper().put(PropertyKeys.display, display);
435   }
436 
437   /**
438   This attribute is for internal use only.
439 
440   */
441   public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
442     Object object = getStateHelper().eval(PropertyKeys.borderBottom);
443     if (object != null) {
444        return Measure.valueOf(object);
445     }
446     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
447   getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this) : Measure.ZERO;
448   }
449 
450   public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
451     getStateHelper().put(PropertyKeys.borderBottom, borderBottom);
452   }
453 
454   /**
455   Only applicable in the case that the data model is a tree.
456    This flag indicates that the root node should be displayed with an open-close-switch.
457   <br />Default: <code>false</code>
458   */
459   public boolean isShowRootJunction() {
460     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showRootJunction);
461     if (bool != null) {
462       return bool;
463     }
464     return false;
465   }
466 
467   public void setShowRootJunction(boolean showRootJunction) {
468     getStateHelper().put(PropertyKeys.showRootJunction, showRootJunction);
469   }
470 
471   /**
472   This attribute is for internal use only.
473 
474   */
475   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
476     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
477     if (object != null) {
478        return Measure.valueOf(object);
479     }
480     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
481   getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this) : Measure.ZERO;
482   }
483 
484   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
485     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
486   }
487 
488   public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
489     Object object = getStateHelper().eval(PropertyKeys.preferredWidth);
490     if (object != null) {
491        return Measure.valueOf(object);
492     }
493     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this) : Measure.ZERO;
494   }
495 
496   public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
497     getStateHelper().put(PropertyKeys.preferredWidth, preferredWidth);
498   }
499 
500   /**
501   This attribute is for internal use only.
502 
503   */
504   public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
505     Object object = getStateHelper().eval(PropertyKeys.borderTop);
506     if (object != null) {
507        return Measure.valueOf(object);
508     }
509     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
510   getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this) : Measure.ZERO;
511   }
512 
513   public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
514     getStateHelper().put(PropertyKeys.borderTop, borderTop);
515   }
516 
517   /**
518   This attribute is for internal use only.
519 
520   */
521   public java.lang.Integer getVerticalIndex() {
522     Number value  = (Number) getStateHelper().eval(PropertyKeys.verticalIndex);
523     if (value != null) {
524       return value.intValue();
525     }
526     return null;
527   }
528 
529   public void setVerticalIndex(java.lang.Integer verticalIndex) {
530     getStateHelper().put(PropertyKeys.verticalIndex, verticalIndex);
531   }
532 
533   /**
534   Flag indicating whether or not the paging panel should be display, if it is not needed for paging.<br />
535    <ul>
536    <li>showPagingAlways="false" which is the default means, that the paging footer should be displayed,
537    only when it is needed.</li>
538    <ul>
539    <li>When the rows="0" paging is not needed, so the footer will not be rendered,</li>
540    <li>when rows="N", N &gt; 0 and the size of the data value is &lt;= N paging is not needed
541    and the footer will not be rendered,</li>
542    <li>in any other case the paging footer will be displayed.</li>
543    </ul>
544    <li>showPagingAlways="true" means, that the paging footer should be displayed in any case.</li>
545    </ul>
546   <br />Default: <code>false</code>
547   */
548   public boolean isShowPagingAlways() {
549     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showPagingAlways);
550     if (bool != null) {
551       return bool;
552     }
553     return false;
554   }
555 
556   public void setShowPagingAlways(boolean showPagingAlways) {
557     getStateHelper().put(PropertyKeys.showPagingAlways, showPagingAlways);
558   }
559 
560   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
561     if (currentMarkup != null) {
562       return currentMarkup;
563     }
564     return null;
565   }
566 
567   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
568     this.currentMarkup = currentMarkup;
569   }
570 
571   /**
572   <p>
573    Indicate the partially rendered components in a case of a submit.
574    </p>
575    <p>
576    The search depends on the number of prefixed colons in the relativeId:
577    <dl>
578      <dd>number of prefixed colons == 0</dd>
579      <dt>fully relative</dt>
580      <dd>number of prefixed colons == 1</dd>
581      <dt>absolute (still normal findComponent syntax)</dt>
582      <dd>number of prefixed colons == 2</dd>
583      <dt>search in the current naming container (same as 0 colons)</dt>
584      <dd>number of prefixed colons == 3</dd>
585      <dt>search in the parent naming container of the current naming container</dt>
586      <dd>number of prefixed colons > 3</dd>
587      <dt>go to the next parent naming container for each additional colon</dt>
588    </dl>
589    </p>
590    <p>
591    If a literal is specified: to use more than one identifier the identifiers must be space delimited.
592    </p>
593    <p>
594    Using this in a UISheet or UITabGroup component this list indicates components to update when calling
595    internal AJAX requests like sort or paging commands.
596    Don't forget to add the sheet-id or tagGroup-id in that case, if needed.
597    </p>
598    <p>
599    You can also use
600 
601   */
602   public String[] getRenderedPartially() {
603     Object strArray = getStateHelper().eval(PropertyKeys.renderedPartially);
604     if (strArray != null) {
605       if (strArray instanceof String[]) {
606         return (String[]) strArray;
607       } else if (strArray instanceof String) {
608         String[] strings = StringUtils.split((String) strArray, ", ");
609         List<String> result = new ArrayList<String>(strings.length);
610         for (String string : strings) {
611           if (string.trim().length() != 0) {
612             result.add(string.trim());
613           }
614         }
615         return result.toArray(new String[result.size()]);
616       } else if (strArray == null) {
617         return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
618       } else {
619         return new String[]{strArray.toString()};
620       }
621     }
622     return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
623   }
624 
625   public void setRenderedPartially(String[] renderedPartially) {
626     getStateHelper().put(PropertyKeys.renderedPartially, renderedPartially);
627   }
628 
629   public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
630     Object object = getStateHelper().eval(PropertyKeys.minimumHeight);
631     if (object != null) {
632        return Measure.valueOf(object);
633     }
634     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this) : Measure.ZERO;
635   }
636 
637   public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
638     getStateHelper().put(PropertyKeys.minimumHeight, minimumHeight);
639   }
640 
641   /**
642   Flag indicating if paging arrows are shown near page range
643   <br />Default: <code>true</code>
644   */
645   public boolean isShowPageRangeArrows() {
646     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showPageRangeArrows);
647     if (bool != null) {
648       return bool;
649     }
650     return true;
651   }
652 
653   public void setShowPageRangeArrows(boolean showPageRangeArrows) {
654     getStateHelper().put(PropertyKeys.showPageRangeArrows, showPageRangeArrows);
655   }
656 
657   /**
658   Only applicable in the case that the data model is a tree.
659    This flag indicates that the root node should be displayed.
660    Often in tree structures the root node is special and should not be displayed.
661   <br />Default: <code>false</code>
662   */
663   public boolean isShowRoot() {
664     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showRoot);
665     if (bool != null) {
666       return bool;
667     }
668     return false;
669   }
670 
671   public void setShowRoot(boolean showRoot) {
672     getStateHelper().put(PropertyKeys.showRoot, showRoot);
673   }
674 
675   public java.lang.Integer getRowSpan() {
676     Number value  = (Number) getStateHelper().eval(PropertyKeys.rowSpan);
677     if (value != null) {
678       return value.intValue();
679     }
680     return 1;
681   }
682 
683   public void setRowSpan(java.lang.Integer rowSpan) {
684     getStateHelper().put(PropertyKeys.rowSpan, rowSpan);
685   }
686 
687   /**
688   This value will usually be set by the layout manager.
689 
690   */
691   public org.apache.myfaces.tobago.layout.Measure getLeft() {
692     Object object = getStateHelper().eval(PropertyKeys.left);
693     if (object != null) {
694        return Measure.valueOf(object);
695     }
696     return null;
697   }
698 
699   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
700     getStateHelper().put(PropertyKeys.left, left);
701   }
702 
703   public java.lang.Integer getColumnSpan() {
704     Number value  = (Number) getStateHelper().eval(PropertyKeys.columnSpan);
705     if (value != null) {
706       return value.intValue();
707     }
708     return 1;
709   }
710 
711   public void setColumnSpan(java.lang.Integer columnSpan) {
712     getStateHelper().put(PropertyKeys.columnSpan, columnSpan);
713   }
714 
715   /**
716   This attribute is for internal use only.
717 
718   */
719   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
720     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
721     if (object != null) {
722        return Measure.valueOf(object);
723     }
724     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
725   getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this) : Measure.ZERO;
726   }
727 
728   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
729     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
730   }
731 
732   /**
733   This value will usually be set by the layout manager.
734 
735   */
736   public org.apache.myfaces.tobago.layout.Measure getTop() {
737     Object object = getStateHelper().eval(PropertyKeys.top);
738     if (object != null) {
739        return Measure.valueOf(object);
740     }
741     return null;
742   }
743 
744   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
745     getStateHelper().put(PropertyKeys.top, top);
746   }
747 
748   /**
749   Flag indicating if paging arrows are shown near direct links
750   <br />Default: <code>false</code>
751   */
752   public boolean isShowDirectLinksArrows() {
753     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showDirectLinksArrows);
754     if (bool != null) {
755       return bool;
756     }
757     return false;
758   }
759 
760   public void setShowDirectLinksArrows(boolean showDirectLinksArrows) {
761     getStateHelper().put(PropertyKeys.showDirectLinksArrows, showDirectLinksArrows);
762   }
763 
764   /**
765   Flag indicating whether or not the range of displayed rows should
766    rendered in the sheet's footer. Rendering this range also offers the
767    capability to enter the index of the start row directly.
768   <br />Default: <code>left</code><br />Allowed Values: <code>left,center,right,none</code>
769   */
770   public java.lang.String getShowRowRange() {
771     java.lang.String showRowRange = (java.lang.String) getStateHelper().eval(PropertyKeys.showRowRange);
772     if (showRowRange != null) {
773       return showRowRange;
774     }
775     return "left";
776   }
777 
778   public void setShowRowRange(java.lang.String showRowRange) {
779     getStateHelper().put(PropertyKeys.showRowRange, showRowRange);
780   }
781 
782   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
783     Object object = getStateHelper().eval(PropertyKeys.marginRight);
784     if (object != null) {
785        return Measure.valueOf(object);
786     }
787     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this) : Measure.ZERO;
788   }
789 
790   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
791     getStateHelper().put(PropertyKeys.marginRight, marginRight);
792   }
793 
794   public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
795     Object object = getStateHelper().eval(PropertyKeys.preferredHeight);
796     if (object != null) {
797        return Measure.valueOf(object);
798     }
799     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this) : Measure.ZERO;
800   }
801 
802   public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
803     getStateHelper().put(PropertyKeys.preferredHeight, preferredHeight);
804   }
805 
806   public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
807     Object object = getStateHelper().eval(PropertyKeys.maximumWidth);
808     if (object != null) {
809        return Measure.valueOf(object);
810     }
811     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this) : Measure.ZERO;
812   }
813 
814   public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
815     getStateHelper().put(PropertyKeys.maximumWidth, maximumWidth);
816   }
817 
818   /**
819   This attribute is for internal use only.
820 
821   */
822   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
823     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
824     if (object != null) {
825        return Measure.valueOf(object);
826     }
827     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
828   getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this) : Measure.ZERO;
829   }
830 
831   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
832     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
833   }
834 
835   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
836     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
837     if (object != null) {
838        return Measure.valueOf(object);
839     }
840     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this) : Measure.ZERO;
841   }
842 
843   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
844     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
845   }
846 
847   /**
848   Flag indicating whether or not the sheet should be selectable.
849   <br />Default: <code>multi</code><br />Allowed Values: <code>none,single,singleOrNone,multi</code>
850   */
851   public java.lang.String getSelectable() {
852     java.lang.String selectable = (java.lang.String) getStateHelper().eval(PropertyKeys.selectable);
853     if (selectable != null) {
854       return selectable;
855     }
856     return "multi";
857   }
858 
859   public void setSelectable(java.lang.String selectable) {
860     getStateHelper().put(PropertyKeys.selectable, selectable);
861   }
862 
863   /**
864   Flag indicating the header should be rendered.
865   <br />Default: <code>true</code>
866   */
867   public boolean isShowHeader() {
868     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showHeader);
869     if (bool != null) {
870       return bool;
871     }
872     return true;
873   }
874 
875   public void setShowHeader(boolean showHeader) {
876     getStateHelper().put(PropertyKeys.showHeader, showHeader);
877   }
878 
879   /**
880   The count of rendered direct paging links in the sheet's footer.<br />
881   <br />Default: <code>9</code>
882   */
883   public java.lang.Integer getDirectLinkCount() {
884     Number value  = (Number) getStateHelper().eval(PropertyKeys.directLinkCount);
885     if (value != null) {
886       return value.intValue();
887     }
888     return 9;
889   }
890 
891   public void setDirectLinkCount(java.lang.Integer directLinkCount) {
892     getStateHelper().put(PropertyKeys.directLinkCount, directLinkCount);
893   }
894 
895   /**
896    * @deprecated since 2.0.0
897    */
898   @Deprecated
899   public javax.faces.el.MethodBinding getSortActionListener() {
900     javax.el.MethodExpression expression = getSortActionListenerExpression();
901     if (expression instanceof MethodBindingToMethodExpression) {
902       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
903     }
904     if (expression != null) {
905        return new MethodExpressionToMethodBinding(expression);
906     }
907     return null;
908   }
909 
910   /**
911    * @deprecated since 2.0.0
912    */
913   @Deprecated
914   public void setSortActionListener(javax.faces.el.MethodBinding sortActionListener) {
915     if (sortActionListener != null) {
916       setSortActionListenerExpression(new MethodBindingToMethodExpression(sortActionListener));
917     } else {
918       setSortActionListenerExpression(null);
919     }
920   }
921 
922   public javax.el.MethodExpression getSortActionListenerExpression() {
923     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.sortActionListener);
924   }
925 
926   public void setSortActionListenerExpression(javax.el.MethodExpression sortActionListener) {
927     getStateHelper().put(PropertyKeys.sortActionListener, sortActionListener);
928   }
929 
930 
931   /**
932   This attribute is for internal use only.
933 
934   */
935   public java.lang.Integer getHorizontalIndex() {
936     Number value  = (Number) getStateHelper().eval(PropertyKeys.horizontalIndex);
937     if (value != null) {
938       return value.intValue();
939     }
940     return null;
941   }
942 
943   public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
944     getStateHelper().put(PropertyKeys.horizontalIndex, horizontalIndex);
945   }
946 
947   public Object saveState(FacesContext context) {
948     currentMarkup = null;
949     return super.saveState(context);
950   }
951 
952 }