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.application.FacesMessage;
023    import javax.faces.context.FacesContext;
024    import org.apache.myfaces.tobago.context.Markup;
025    import org.apache.myfaces.tobago.internal.component.AbstractUIMessages;
026    import org.apache.myfaces.tobago.layout.Display;
027    import org.apache.myfaces.tobago.layout.Measure;
028    import org.apache.commons.lang.ArrayUtils;
029    import org.apache.commons.lang.StringUtils;
030    import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
031    import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
032    import org.apache.myfaces.tobago.internal.util.Deprecation;
033    import org.apache.myfaces.tobago.renderkit.MarginValues;
034    import org.apache.myfaces.tobago.renderkit.SpacingValues;
035    import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
036    import javax.el.ELException;
037    import javax.faces.FacesException;
038    import java.util.ArrayList;
039    import java.util.List;
040    import javax.el.MethodExpression;
041    import javax.el.ValueExpression;
042    
043    /** 
044     Renders error/validation messages.
045      * UIComponent class, generated from template {@code component1.2.stg} with class
046      * {@link org.apache.myfaces.tobago.internal.taglib.component.MessagesTagDeclaration}.
047     */
048    public class UIMessages
049        extends AbstractUIMessages implements SupportsMarkup {
050    
051      public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Messages";
052    
053      private org.apache.myfaces.tobago.context.Markup markup;
054      private java.lang.Boolean showSummary;
055      private org.apache.myfaces.tobago.component.UIMessages.OrderBy orderBy;
056      private java.lang.String globalOnly;
057      private org.apache.myfaces.tobago.layout.Measure marginLeft;
058      private java.lang.String forComponent;
059      private org.apache.myfaces.tobago.layout.Measure minimumHeight;
060      private javax.faces.application.FacesMessage.Severity maxSeverity;
061      private javax.faces.application.FacesMessage.Severity minSeverity;
062      private org.apache.myfaces.tobago.layout.Measure height;
063      private org.apache.myfaces.tobago.layout.Measure minimumWidth;
064      private java.lang.Integer rowSpan;
065      private java.lang.Boolean confirmation;
066      private org.apache.myfaces.tobago.layout.Measure left;
067      private java.lang.Integer columnSpan;
068      private org.apache.myfaces.tobago.layout.Measure maximumHeight;
069      private org.apache.myfaces.tobago.layout.Measure top;
070      private org.apache.myfaces.tobago.layout.Measure currentWidth;
071      private org.apache.myfaces.tobago.layout.Measure marginTop;
072      private org.apache.myfaces.tobago.layout.Measure marginRight;
073      private org.apache.myfaces.tobago.layout.Measure width;
074      private org.apache.myfaces.tobago.layout.Measure currentHeight;
075      private org.apache.myfaces.tobago.layout.Measure preferredHeight;
076      private java.lang.Boolean showDetail;
077      private org.apache.myfaces.tobago.layout.Display display;
078      private org.apache.myfaces.tobago.layout.Measure maximumWidth;
079      private org.apache.myfaces.tobago.layout.Measure preferredWidth;
080      private org.apache.myfaces.tobago.layout.Measure marginBottom;
081      private java.lang.Integer verticalIndex;
082      private org.apache.myfaces.tobago.context.Markup currentMarkup;
083      private java.lang.Integer horizontalIndex;
084      private java.lang.Integer maxNumber;
085    
086    
087      public org.apache.myfaces.tobago.context.Markup getMarkup() {
088        if (markup != null) {
089          return markup;
090        }
091        ValueExpression ve = getValueExpression("markup");
092        if (ve != null) {
093          try {
094            Object object = ve.getValue(getFacesContext().getELContext());
095            return Markup.valueOf(object);
096          } catch (ELException e) {
097                      throw new FacesException(e);
098              }
099        }
100        return null;
101      }
102    
103      public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
104        this.markup = markup;
105      }
106    
107      /**
108      Flag indicating whether the summary should be included
109      <br />Default: <code>true</code>
110      */
111      public boolean isShowSummary() {
112        if (showSummary != null) {
113          return showSummary;
114        }
115        ValueExpression ve = getValueExpression("showSummary");
116        if (ve != null) {
117          try {
118            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
119            if (bool != null) {
120              return bool;
121            }
122          } catch (ELException e) {
123                      throw new FacesException(e);
124              }
125        }
126        return true;
127      }
128    
129      public void setShowSummary(boolean showSummary) {
130        this.showSummary = showSummary;
131      }
132    
133      /**
134      Sets the order of the messages.
135      <br />Default: <code>occurrence</code><br />Allowed Values: <code>occurrence,severity</code>
136      */
137      public org.apache.myfaces.tobago.component.UIMessages.OrderBy getOrderBy() {
138        if (orderBy != null) {
139          return orderBy;
140        }
141        ValueExpression ve = getValueExpression("orderBy");
142        if (ve != null) {
143          try {
144            org.apache.myfaces.tobago.component.UIMessages.OrderBy orderBy = (org.apache.myfaces.tobago.component.UIMessages.OrderBy) ve.getValue(getFacesContext().getELContext());
145            if (orderBy != null) {
146              return orderBy;
147            }
148          } catch (ELException e) {
149                      throw new FacesException(e);
150              }
151        }
152        return org.apache.myfaces.tobago.internal.component.AbstractUIMessages.OrderBy.OCCURRENCE;
153      }
154    
155      public void setOrderBy(org.apache.myfaces.tobago.component.UIMessages.OrderBy orderBy) {
156        this.orderBy = orderBy;
157      }
158    
159      /**
160      Flag indicating that only messages that are not associated to any
161       particular UIComponent should be displayed. That are messages without clientId.
162      <br />Default: <code>false</code>
163      */
164      public java.lang.String getGlobalOnly() {
165        if (globalOnly != null) {
166          return globalOnly;
167        }
168        ValueExpression ve = getValueExpression("globalOnly");
169        if (ve != null) {
170          try {
171            java.lang.String globalOnly = (java.lang.String) ve.getValue(getFacesContext().getELContext());
172            if (globalOnly != null) {
173              return globalOnly;
174            }
175          } catch (ELException e) {
176                      throw new FacesException(e);
177              }
178        }
179        return "false";
180      }
181    
182      public void setGlobalOnly(java.lang.String globalOnly) {
183        this.globalOnly = globalOnly;
184      }
185    
186      public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
187        if (marginLeft != null) {
188          return marginLeft;
189        }
190        ValueExpression ve = getValueExpression("marginLeft");
191        if (ve != null) {
192          try {
193            Object object = ve.getValue(getFacesContext().getELContext());
194            return Measure.valueOf(object);
195          } catch (ELException e) {
196                      throw new FacesException(e);
197              }
198        }
199        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this);
200      }
201    
202      public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
203        this.marginLeft = marginLeft;
204      }
205    
206      /**
207      Id of the component, this is related to.
208    
209      */
210      public java.lang.String getFor() {
211        if (forComponent != null) {
212          return forComponent;
213        }
214        ValueExpression ve = getValueExpression("for");
215        if (ve != null) {
216          try {
217            return (java.lang.String) ve.getValue(getFacesContext().getELContext());
218          } catch (ELException e) {
219                      throw new FacesException(e);
220              }
221        }
222        return null;
223      }
224    
225      public void setFor(java.lang.String forComponent) {
226        this.forComponent = forComponent;
227      }
228    
229      public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
230        if (minimumHeight != null) {
231          return minimumHeight;
232        }
233        ValueExpression ve = getValueExpression("minimumHeight");
234        if (ve != null) {
235          try {
236            Object object = ve.getValue(getFacesContext().getELContext());
237            return Measure.valueOf(object);
238          } catch (ELException e) {
239                      throw new FacesException(e);
240              }
241        }
242        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this);
243      }
244    
245      public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
246        this.minimumHeight = minimumHeight;
247      }
248    
249      /**
250      Sets the maximum severity to be shown. E. g. "warn" shows only "warn" and "info".
251       When setting this attribute you usually shoud take care, that you have a second message tag to show the
252       higher severity levels.
253      <br />Default: <code>fatal</code>
254      */
255      public javax.faces.application.FacesMessage.Severity getMaxSeverity() {
256        if (maxSeverity != null) {
257          return maxSeverity;
258        }
259        ValueExpression ve = getValueExpression("maxSeverity");
260        if (ve != null) {
261          try {
262            javax.faces.application.FacesMessage.Severity maxSeverity = (javax.faces.application.FacesMessage.Severity) ve.getValue(getFacesContext().getELContext());
263            if (maxSeverity != null) {
264              return maxSeverity;
265            }
266          } catch (ELException e) {
267                      throw new FacesException(e);
268              }
269        }
270        return javax.faces.application.FacesMessage.SEVERITY_FATAL;
271      }
272    
273      public void setMaxSeverity(javax.faces.application.FacesMessage.Severity maxSeverity) {
274        this.maxSeverity = maxSeverity;
275      }
276    
277      /**
278      Sets the mininum severity to be shown. E. g. "warn" shows only "warn", "error" and "fatal".
279      <br />Default: <code>info</code>
280      */
281      public javax.faces.application.FacesMessage.Severity getMinSeverity() {
282        if (minSeverity != null) {
283          return minSeverity;
284        }
285        ValueExpression ve = getValueExpression("minSeverity");
286        if (ve != null) {
287          try {
288            javax.faces.application.FacesMessage.Severity minSeverity = (javax.faces.application.FacesMessage.Severity) ve.getValue(getFacesContext().getELContext());
289            if (minSeverity != null) {
290              return minSeverity;
291            }
292          } catch (ELException e) {
293                      throw new FacesException(e);
294              }
295        }
296        return javax.faces.application.FacesMessage.SEVERITY_INFO;
297      }
298    
299      public void setMinSeverity(javax.faces.application.FacesMessage.Severity minSeverity) {
300        this.minSeverity = minSeverity;
301      }
302    
303      /**
304      This value will usually be set by the layout manager.
305    
306      */
307      public org.apache.myfaces.tobago.layout.Measure getHeight() {
308        if (height != null) {
309          return height;
310        }
311        ValueExpression ve = getValueExpression("height");
312        if (ve != null) {
313          try {
314            Object object = ve.getValue(getFacesContext().getELContext());
315            return Measure.valueOf(object);
316          } catch (ELException e) {
317                      throw new FacesException(e);
318              }
319        }
320        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this);
321      }
322    
323      public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
324        this.height = height;
325      }
326    
327      public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
328        if (minimumWidth != null) {
329          return minimumWidth;
330        }
331        ValueExpression ve = getValueExpression("minimumWidth");
332        if (ve != null) {
333          try {
334            Object object = ve.getValue(getFacesContext().getELContext());
335            return Measure.valueOf(object);
336          } catch (ELException e) {
337                      throw new FacesException(e);
338              }
339        }
340        return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this);
341      }
342    
343      public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
344        this.minimumWidth = minimumWidth;
345      }
346    
347      public java.lang.Integer getRowSpan() {
348        if (rowSpan != null) {
349          return rowSpan;
350        }
351        ValueExpression ve = getValueExpression("rowSpan");
352        if (ve != null) {
353          try {
354            Number number = (Number) ve.getValue(getFacesContext().getELContext());
355            if (number != null) {
356              return number.intValue();
357            }
358          } catch (ELException e) {
359                      throw new FacesException(e);
360              }
361        }
362        return 1;
363      }
364    
365      public void setRowSpan(java.lang.Integer rowSpan) {
366        this.rowSpan = rowSpan;
367      }
368    
369      /**
370      Has the user to confirm this message?
371       This attributes handles the case, if the application wants to warn the user about a problem,
372       and the user has to confirm the message before he/she can continue.
373      <br />Default: <code>false</code>
374      */
375      public boolean isConfirmation() {
376        if (confirmation != null) {
377          return confirmation;
378        }
379        ValueExpression ve = getValueExpression("confirmation");
380        if (ve != null) {
381          try {
382            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
383            if (bool != null) {
384              return bool;
385            }
386          } catch (ELException e) {
387                      throw new FacesException(e);
388              }
389        }
390        return false;
391      }
392    
393      public void setConfirmation(boolean confirmation) {
394        this.confirmation = confirmation;
395      }
396    
397      /**
398      This value will usually be set by the layout manager.
399    
400      */
401      public org.apache.myfaces.tobago.layout.Measure getLeft() {
402        if (left != null) {
403          return left;
404        }
405        ValueExpression ve = getValueExpression("left");
406        if (ve != null) {
407          try {
408            Object object = ve.getValue(getFacesContext().getELContext());
409            return Measure.valueOf(object);
410          } catch (ELException e) {
411                      throw new FacesException(e);
412              }
413        }
414        return null;
415      }
416    
417      public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
418        this.left = left;
419      }
420    
421      public java.lang.Integer getColumnSpan() {
422        if (columnSpan != null) {
423          return columnSpan;
424        }
425        ValueExpression ve = getValueExpression("columnSpan");
426        if (ve != null) {
427          try {
428            Number number = (Number) ve.getValue(getFacesContext().getELContext());
429            if (number != null) {
430              return number.intValue();
431            }
432          } catch (ELException e) {
433                      throw new FacesException(e);
434              }
435        }
436        return 1;
437      }
438    
439      public void setColumnSpan(java.lang.Integer columnSpan) {
440        this.columnSpan = columnSpan;
441      }
442    
443      public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
444        if (maximumHeight != null) {
445          return maximumHeight;
446        }
447        ValueExpression ve = getValueExpression("maximumHeight");
448        if (ve != null) {
449          try {
450            Object object = ve.getValue(getFacesContext().getELContext());
451            return Measure.valueOf(object);
452          } catch (ELException e) {
453                      throw new FacesException(e);
454              }
455        }
456        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this);
457      }
458    
459      public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
460        this.maximumHeight = maximumHeight;
461      }
462    
463      /**
464      This value will usually be set by the layout manager.
465    
466      */
467      public org.apache.myfaces.tobago.layout.Measure getTop() {
468        if (top != null) {
469          return top;
470        }
471        ValueExpression ve = getValueExpression("top");
472        if (ve != null) {
473          try {
474            Object object = ve.getValue(getFacesContext().getELContext());
475            return Measure.valueOf(object);
476          } catch (ELException e) {
477                      throw new FacesException(e);
478              }
479        }
480        return null;
481      }
482    
483      public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
484        this.top = top;
485      }
486    
487      /**
488      This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
489    
490      */
491      public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
492        if (currentWidth != null) {
493          return currentWidth;
494        }
495        ValueExpression ve = getValueExpression("currentWidth");
496        if (ve != null) {
497          try {
498            Object object = ve.getValue(getFacesContext().getELContext());
499            return Measure.valueOf(object);
500          } catch (ELException e) {
501                      throw new FacesException(e);
502              }
503        }
504        return getWidth();
505      }
506    
507      public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
508        this.currentWidth = currentWidth;
509      }
510    
511      public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
512        if (marginTop != null) {
513          return marginTop;
514        }
515        ValueExpression ve = getValueExpression("marginTop");
516        if (ve != null) {
517          try {
518            Object object = ve.getValue(getFacesContext().getELContext());
519            return Measure.valueOf(object);
520          } catch (ELException e) {
521                      throw new FacesException(e);
522              }
523        }
524        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this);
525      }
526    
527      public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
528        this.marginTop = marginTop;
529      }
530    
531      public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
532        if (marginRight != null) {
533          return marginRight;
534        }
535        ValueExpression ve = getValueExpression("marginRight");
536        if (ve != null) {
537          try {
538            Object object = ve.getValue(getFacesContext().getELContext());
539            return Measure.valueOf(object);
540          } catch (ELException e) {
541                      throw new FacesException(e);
542              }
543        }
544        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this);
545      }
546    
547      public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
548        this.marginRight = marginRight;
549      }
550    
551      /**
552      This value will usually be set by the layout manager.
553    
554      */
555      public org.apache.myfaces.tobago.layout.Measure getWidth() {
556        if (width != null) {
557          return width;
558        }
559        ValueExpression ve = getValueExpression("width");
560        if (ve != null) {
561          try {
562            Object object = ve.getValue(getFacesContext().getELContext());
563            return Measure.valueOf(object);
564          } catch (ELException e) {
565                      throw new FacesException(e);
566              }
567        }
568        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this);
569      }
570    
571      public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
572        this.width = width;
573      }
574    
575      /**
576      This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
577    
578      */
579      public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
580        if (currentHeight != null) {
581          return currentHeight;
582        }
583        ValueExpression ve = getValueExpression("currentHeight");
584        if (ve != null) {
585          try {
586            Object object = ve.getValue(getFacesContext().getELContext());
587            return Measure.valueOf(object);
588          } catch (ELException e) {
589                      throw new FacesException(e);
590              }
591        }
592        return getHeight();
593      }
594    
595      public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
596        this.currentHeight = currentHeight;
597      }
598    
599      public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
600        if (preferredHeight != null) {
601          return preferredHeight;
602        }
603        ValueExpression ve = getValueExpression("preferredHeight");
604        if (ve != null) {
605          try {
606            Object object = ve.getValue(getFacesContext().getELContext());
607            return Measure.valueOf(object);
608          } catch (ELException e) {
609                      throw new FacesException(e);
610              }
611        }
612        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this);
613      }
614    
615      public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
616        this.preferredHeight = preferredHeight;
617      }
618    
619      /**
620      Flag indicating whether the detail should be included
621      <br />Default: <code>false</code>
622      */
623      public boolean isShowDetail() {
624        if (showDetail != null) {
625          return showDetail;
626        }
627        ValueExpression ve = getValueExpression("showDetail");
628        if (ve != null) {
629          try {
630            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
631            if (bool != null) {
632              return bool;
633            }
634          } catch (ELException e) {
635                      throw new FacesException(e);
636              }
637        }
638        return false;
639      }
640    
641      public void setShowDetail(boolean showDetail) {
642        this.showDetail = showDetail;
643      }
644    
645      /**
646      This attribute is for internal use only.
647    
648      */
649      public org.apache.myfaces.tobago.layout.Display getDisplay() {
650        if (display != null) {
651          return display;
652        }
653        ValueExpression ve = getValueExpression("display");
654        if (ve != null) {
655          try {
656            return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext());
657          } catch (ELException e) {
658                      throw new FacesException(e);
659              }
660        }
661        return null;
662      }
663    
664      public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
665        this.display = display;
666      }
667    
668      public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
669        if (maximumWidth != null) {
670          return maximumWidth;
671        }
672        ValueExpression ve = getValueExpression("maximumWidth");
673        if (ve != null) {
674          try {
675            Object object = ve.getValue(getFacesContext().getELContext());
676            return Measure.valueOf(object);
677          } catch (ELException e) {
678                      throw new FacesException(e);
679              }
680        }
681        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this);
682      }
683    
684      public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
685        this.maximumWidth = maximumWidth;
686      }
687    
688      public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
689        if (preferredWidth != null) {
690          return preferredWidth;
691        }
692        ValueExpression ve = getValueExpression("preferredWidth");
693        if (ve != null) {
694          try {
695            Object object = ve.getValue(getFacesContext().getELContext());
696            return Measure.valueOf(object);
697          } catch (ELException e) {
698                      throw new FacesException(e);
699              }
700        }
701        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this);
702      }
703    
704      public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
705        this.preferredWidth = preferredWidth;
706      }
707    
708      public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
709        if (marginBottom != null) {
710          return marginBottom;
711        }
712        ValueExpression ve = getValueExpression("marginBottom");
713        if (ve != null) {
714          try {
715            Object object = ve.getValue(getFacesContext().getELContext());
716            return Measure.valueOf(object);
717          } catch (ELException e) {
718                      throw new FacesException(e);
719              }
720        }
721        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this);
722      }
723    
724      public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
725        this.marginBottom = marginBottom;
726      }
727    
728      /**
729      This attribute is for internal use only.
730    
731      */
732      public java.lang.Integer getVerticalIndex() {
733        if (verticalIndex != null) {
734          return verticalIndex;
735        }
736        ValueExpression ve = getValueExpression("verticalIndex");
737        if (ve != null) {
738          try {
739            Number number = (Number) ve.getValue(getFacesContext().getELContext());
740            if (number != null) {
741              return number.intValue();
742            }
743          } catch (ELException e) {
744                      throw new FacesException(e);
745              }
746        }
747        return null;
748      }
749    
750      public void setVerticalIndex(java.lang.Integer verticalIndex) {
751        this.verticalIndex = verticalIndex;
752      }
753    
754      public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
755        if (currentMarkup != null) {
756          return currentMarkup;
757        }
758        ValueExpression ve = getValueExpression("currentMarkup");
759        if (ve != null) {
760          try {
761            Object object = ve.getValue(getFacesContext().getELContext());
762            return Markup.valueOf(object);
763          } catch (ELException e) {
764                      throw new FacesException(e);
765              }
766        }
767        return null;
768      }
769    
770      public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
771        this.currentMarkup = currentMarkup;
772      }
773    
774      /**
775      This attribute is for internal use only.
776    
777      */
778      public java.lang.Integer getHorizontalIndex() {
779        if (horizontalIndex != null) {
780          return horizontalIndex;
781        }
782        ValueExpression ve = getValueExpression("horizontalIndex");
783        if (ve != null) {
784          try {
785            Number number = (Number) ve.getValue(getFacesContext().getELContext());
786            if (number != null) {
787              return number.intValue();
788            }
789          } catch (ELException e) {
790                      throw new FacesException(e);
791              }
792        }
793        return null;
794      }
795    
796      public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
797        this.horizontalIndex = horizontalIndex;
798      }
799    
800      /**
801      Sets the maximum number of messages to show.
802      <br />Default: <code>2147483647</code>
803      */
804      public java.lang.Integer getMaxNumber() {
805        if (maxNumber != null) {
806          return maxNumber;
807        }
808        ValueExpression ve = getValueExpression("maxNumber");
809        if (ve != null) {
810          try {
811            Number number = (Number) ve.getValue(getFacesContext().getELContext());
812            if (number != null) {
813              return number.intValue();
814            }
815          } catch (ELException e) {
816                      throw new FacesException(e);
817              }
818        }
819        return 2147483647;
820      }
821    
822      public void setMaxNumber(java.lang.Integer maxNumber) {
823        this.maxNumber = maxNumber;
824      }
825    
826      public void restoreState(FacesContext context, Object componentState) {
827        Object[] values = (Object[]) componentState;
828        super.restoreState(context, values[0]);
829        markup = (org.apache.myfaces.tobago.context.Markup) values[1];
830        showSummary = (java.lang.Boolean) values[2];
831        orderBy = (org.apache.myfaces.tobago.component.UIMessages.OrderBy) values[3];
832        globalOnly = (java.lang.String) values[4];
833        marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[5];
834        forComponent = (java.lang.String) values[6];
835        minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[7];
836        maxSeverity = (javax.faces.application.FacesMessage.Severity) values[8];
837        minSeverity = (javax.faces.application.FacesMessage.Severity) values[9];
838        height = (org.apache.myfaces.tobago.layout.Measure) values[10];
839        minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[11];
840        rowSpan = (java.lang.Integer) values[12];
841        confirmation = (java.lang.Boolean) values[13];
842        left = (org.apache.myfaces.tobago.layout.Measure) values[14];
843        columnSpan = (java.lang.Integer) values[15];
844        maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[16];
845        top = (org.apache.myfaces.tobago.layout.Measure) values[17];
846        currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[18];
847        marginTop = (org.apache.myfaces.tobago.layout.Measure) values[19];
848        marginRight = (org.apache.myfaces.tobago.layout.Measure) values[20];
849        width = (org.apache.myfaces.tobago.layout.Measure) values[21];
850        currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[22];
851        preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[23];
852        showDetail = (java.lang.Boolean) values[24];
853        display = (org.apache.myfaces.tobago.layout.Display) values[25];
854        maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[26];
855        preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[27];
856        marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[28];
857        verticalIndex = (java.lang.Integer) values[29];
858        currentMarkup = (org.apache.myfaces.tobago.context.Markup) values[30];
859        horizontalIndex = (java.lang.Integer) values[31];
860        maxNumber = (java.lang.Integer) values[32];
861      }
862    
863      public Object saveState(FacesContext context) {
864        Object[] values = new Object[33];
865        values[0] = super.saveState(context);
866        values[1] = markup;
867        values[2] = showSummary;
868        values[3] = orderBy;
869        values[4] = globalOnly;
870        values[5] = marginLeft;
871        values[6] = forComponent;
872        values[7] = minimumHeight;
873        values[8] = maxSeverity;
874        values[9] = minSeverity;
875        values[10] = height;
876        values[11] = minimumWidth;
877        values[12] = rowSpan;
878        values[13] = confirmation;
879        values[14] = left;
880        values[15] = columnSpan;
881        values[16] = maximumHeight;
882        values[17] = top;
883        values[18] = currentWidth;
884        values[19] = marginTop;
885        values[20] = marginRight;
886        values[21] = width;
887        values[22] = currentHeight;
888        values[23] = preferredHeight;
889        values[24] = showDetail;
890        values[25] = display;
891        values[26] = maximumWidth;
892        values[27] = preferredWidth;
893        values[28] = marginBottom;
894        values[29] = verticalIndex;
895        values[30] = currentMarkup;
896        values[31] = horizontalIndex;
897        values[32] = maxNumber;
898        return values;
899      }
900    
901    
902    }