001 // ---------- Attention: Generated code, please do not modify! ----------- 002 003 /* 004 * Licensed to the Apache Software Foundation (ASF) under one or more 005 * contributor license agreements. See the NOTICE file distributed with 006 * this work for additional information regarding copyright ownership. 007 * The ASF licenses this file to You under the Apache License, Version 2.0 008 * (the "License"); you may not use this file except in compliance with 009 * the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020 package org.apache.myfaces.tobago.component; 021 022 import javax.faces.context.FacesContext; 023 import org.apache.myfaces.tobago.context.Markup; 024 import org.apache.myfaces.tobago.internal.component.AbstractUIPage; 025 import org.apache.myfaces.tobago.layout.Display; 026 import org.apache.myfaces.tobago.layout.Measure; 027 import org.apache.commons.lang.ArrayUtils; 028 import org.apache.commons.lang.StringUtils; 029 import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression; 030 import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding; 031 import org.apache.myfaces.tobago.internal.util.Deprecation; 032 import org.apache.myfaces.tobago.renderkit.MarginValues; 033 import org.apache.myfaces.tobago.renderkit.SpacingValues; 034 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer; 035 import javax.el.ELException; 036 import javax.faces.FacesException; 037 import java.util.ArrayList; 038 import java.util.List; 039 import javax.el.MethodExpression; 040 import javax.el.ValueExpression; 041 042 /** 043 Renders a page element. 044 * UIComponent class, generated from template {@code component1.2.stg} with class 045 * {@link org.apache.myfaces.tobago.internal.taglib.component.PageTagDeclaration}. 046 */ 047 public class UIPage 048 extends AbstractUIPage implements SupportsMarkup { 049 050 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Page"; 051 052 private org.apache.myfaces.tobago.context.Markup markup; 053 private org.apache.myfaces.tobago.layout.Measure marginLeft; 054 private java.lang.Object state; 055 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 056 private java.lang.String focusId; 057 private org.apache.myfaces.tobago.layout.Measure borderLeft; 058 private org.apache.myfaces.tobago.layout.Measure height; 059 private org.apache.myfaces.tobago.layout.Measure minimumWidth; 060 private java.lang.Boolean overflowX; 061 private java.lang.Integer rowSpan; 062 private java.lang.Boolean overflowY; 063 private org.apache.myfaces.tobago.layout.Measure left; 064 private java.lang.Integer columnSpan; 065 private org.apache.myfaces.tobago.layout.Measure borderRight; 066 private org.apache.myfaces.tobago.layout.Measure paddingBottom; 067 private org.apache.myfaces.tobago.layout.Measure maximumHeight; 068 private org.apache.myfaces.tobago.layout.Measure top; 069 private org.apache.myfaces.tobago.layout.Measure currentWidth; 070 private org.apache.myfaces.tobago.layout.Measure paddingTop; 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 org.apache.myfaces.tobago.layout.Display display; 077 private java.lang.String label; 078 private org.apache.myfaces.tobago.layout.Measure borderBottom; 079 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 080 private org.apache.myfaces.tobago.layout.Measure paddingLeft; 081 private org.apache.myfaces.tobago.layout.Measure paddingRight; 082 private org.apache.myfaces.tobago.layout.Measure preferredWidth; 083 private org.apache.myfaces.tobago.layout.Measure marginBottom; 084 private org.apache.myfaces.tobago.layout.Measure borderTop; 085 private java.lang.Integer verticalIndex; 086 private org.apache.myfaces.tobago.context.Markup currentMarkup; 087 private java.lang.String applicationIcon; 088 private java.lang.Integer horizontalIndex; 089 090 091 public org.apache.myfaces.tobago.context.Markup getMarkup() { 092 if (markup != null) { 093 return markup; 094 } 095 ValueExpression ve = getValueExpression("markup"); 096 if (ve != null) { 097 try { 098 Object object = ve.getValue(getFacesContext().getELContext()); 099 return Markup.valueOf(object); 100 } catch (ELException e) { 101 throw new FacesException(e); 102 } 103 } 104 return null; 105 } 106 107 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) { 108 this.markup = markup; 109 } 110 111 public org.apache.myfaces.tobago.layout.Measure getMarginLeft() { 112 if (marginLeft != null) { 113 return marginLeft; 114 } 115 ValueExpression ve = getValueExpression("marginLeft"); 116 if (ve != null) { 117 try { 118 Object object = ve.getValue(getFacesContext().getELContext()); 119 return Measure.valueOf(object); 120 } catch (ELException e) { 121 throw new FacesException(e); 122 } 123 } 124 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this); 125 } 126 127 public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) { 128 this.marginLeft = marginLeft; 129 } 130 131 /** 132 <strong>ValueBindingExpression</strong> pointing to a object to save the 133 component's state. 134 135 @deprecated*/ 136 @Deprecated 137 public java.lang.Object getState() { 138 if (state != null) { 139 return state; 140 } 141 ValueExpression ve = getValueExpression("state"); 142 if (ve != null) { 143 try { 144 return (java.lang.Object) ve.getValue(getFacesContext().getELContext()); 145 } catch (ELException e) { 146 throw new FacesException(e); 147 } 148 } 149 return null; 150 } 151 152 @Deprecated 153 public void setState(java.lang.Object state) { 154 Deprecation.LOG.error("The attribute 'state' of 'UIPage' is deprecated. " 155 + "Please refer the documentation for further information."); 156 this.state = state; 157 } 158 159 public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() { 160 if (minimumHeight != null) { 161 return minimumHeight; 162 } 163 ValueExpression ve = getValueExpression("minimumHeight"); 164 if (ve != null) { 165 try { 166 Object object = ve.getValue(getFacesContext().getELContext()); 167 return Measure.valueOf(object); 168 } catch (ELException e) { 169 throw new FacesException(e); 170 } 171 } 172 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this); 173 } 174 175 public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) { 176 this.minimumHeight = minimumHeight; 177 } 178 179 /** 180 Contains the id of the component which should have the focus after 181 loading the page. 182 Set to empty string for disabling setting of focus. 183 Default (null) enables the "auto focus" feature. 184 185 */ 186 public java.lang.String getFocusId() { 187 if (focusId != null) { 188 return focusId; 189 } 190 ValueExpression ve = getValueExpression("focusId"); 191 if (ve != null) { 192 try { 193 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 194 } catch (ELException e) { 195 throw new FacesException(e); 196 } 197 } 198 return null; 199 } 200 201 public void setFocusId(java.lang.String focusId) { 202 this.focusId = focusId; 203 } 204 205 /** 206 This attribute is for internal use only. 207 208 */ 209 public org.apache.myfaces.tobago.layout.Measure getBorderLeft() { 210 if (borderLeft != null) { 211 return borderLeft; 212 } 213 ValueExpression ve = getValueExpression("borderLeft"); 214 if (ve != null) { 215 try { 216 Object object = ve.getValue(getFacesContext().getELContext()); 217 return Measure.valueOf(object); 218 } catch (ELException e) { 219 throw new FacesException(e); 220 } 221 } 222 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 223 getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this); 224 } 225 226 public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) { 227 this.borderLeft = borderLeft; 228 } 229 230 /** 231 This value will usually be set by the layout manager. 232 233 @deprecated*/ 234 @Deprecated 235 public org.apache.myfaces.tobago.layout.Measure getHeight() { 236 if (height != null) { 237 return height; 238 } 239 ValueExpression ve = getValueExpression("height"); 240 if (ve != null) { 241 try { 242 Object object = ve.getValue(getFacesContext().getELContext()); 243 return Measure.valueOf(object); 244 } catch (ELException e) { 245 throw new FacesException(e); 246 } 247 } 248 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 249 } 250 251 @Deprecated 252 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 253 this.height = height; 254 } 255 256 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 257 if (minimumWidth != null) { 258 return minimumWidth; 259 } 260 ValueExpression ve = getValueExpression("minimumWidth"); 261 if (ve != null) { 262 try { 263 Object object = ve.getValue(getFacesContext().getELContext()); 264 return Measure.valueOf(object); 265 } catch (ELException e) { 266 throw new FacesException(e); 267 } 268 } 269 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 270 } 271 272 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 273 this.minimumWidth = minimumWidth; 274 } 275 276 /** 277 This attribute is for internal use only. 278 279 */ 280 public boolean isOverflowX() { 281 if (overflowX != null) { 282 return overflowX; 283 } 284 ValueExpression ve = getValueExpression("overflowX"); 285 if (ve != null) { 286 try { 287 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 288 if (bool != null) { 289 return bool; 290 } 291 } catch (ELException e) { 292 throw new FacesException(e); 293 } 294 } 295 return false; 296 } 297 298 public void setOverflowX(boolean overflowX) { 299 this.overflowX = overflowX; 300 } 301 302 public java.lang.Integer getRowSpan() { 303 if (rowSpan != null) { 304 return rowSpan; 305 } 306 ValueExpression ve = getValueExpression("rowSpan"); 307 if (ve != null) { 308 try { 309 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 310 if (number != null) { 311 return number.intValue(); 312 } 313 } catch (ELException e) { 314 throw new FacesException(e); 315 } 316 } 317 return 1; 318 } 319 320 public void setRowSpan(java.lang.Integer rowSpan) { 321 this.rowSpan = rowSpan; 322 } 323 324 /** 325 This attribute is for internal use only. 326 327 */ 328 public boolean isOverflowY() { 329 if (overflowY != null) { 330 return overflowY; 331 } 332 ValueExpression ve = getValueExpression("overflowY"); 333 if (ve != null) { 334 try { 335 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 336 if (bool != null) { 337 return bool; 338 } 339 } catch (ELException e) { 340 throw new FacesException(e); 341 } 342 } 343 return false; 344 } 345 346 public void setOverflowY(boolean overflowY) { 347 this.overflowY = overflowY; 348 } 349 350 /** 351 This value will usually be set by the layout manager. 352 353 */ 354 public org.apache.myfaces.tobago.layout.Measure getLeft() { 355 if (left != null) { 356 return left; 357 } 358 ValueExpression ve = getValueExpression("left"); 359 if (ve != null) { 360 try { 361 Object object = ve.getValue(getFacesContext().getELContext()); 362 return Measure.valueOf(object); 363 } catch (ELException e) { 364 throw new FacesException(e); 365 } 366 } 367 return null; 368 } 369 370 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 371 this.left = left; 372 } 373 374 public java.lang.Integer getColumnSpan() { 375 if (columnSpan != null) { 376 return columnSpan; 377 } 378 ValueExpression ve = getValueExpression("columnSpan"); 379 if (ve != null) { 380 try { 381 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 382 if (number != null) { 383 return number.intValue(); 384 } 385 } catch (ELException e) { 386 throw new FacesException(e); 387 } 388 } 389 return 1; 390 } 391 392 public void setColumnSpan(java.lang.Integer columnSpan) { 393 this.columnSpan = columnSpan; 394 } 395 396 /** 397 This attribute is for internal use only. 398 399 */ 400 public org.apache.myfaces.tobago.layout.Measure getBorderRight() { 401 if (borderRight != null) { 402 return borderRight; 403 } 404 ValueExpression ve = getValueExpression("borderRight"); 405 if (ve != null) { 406 try { 407 Object object = ve.getValue(getFacesContext().getELContext()); 408 return Measure.valueOf(object); 409 } catch (ELException e) { 410 throw new FacesException(e); 411 } 412 } 413 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 414 getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this); 415 } 416 417 public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) { 418 this.borderRight = borderRight; 419 } 420 421 /** 422 This attribute is for internal use only. 423 424 */ 425 public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() { 426 if (paddingBottom != null) { 427 return paddingBottom; 428 } 429 ValueExpression ve = getValueExpression("paddingBottom"); 430 if (ve != null) { 431 try { 432 Object object = ve.getValue(getFacesContext().getELContext()); 433 return Measure.valueOf(object); 434 } catch (ELException e) { 435 throw new FacesException(e); 436 } 437 } 438 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 439 getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this); 440 } 441 442 public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) { 443 this.paddingBottom = paddingBottom; 444 } 445 446 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 447 if (maximumHeight != null) { 448 return maximumHeight; 449 } 450 ValueExpression ve = getValueExpression("maximumHeight"); 451 if (ve != null) { 452 try { 453 Object object = ve.getValue(getFacesContext().getELContext()); 454 return Measure.valueOf(object); 455 } catch (ELException e) { 456 throw new FacesException(e); 457 } 458 } 459 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 460 } 461 462 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 463 this.maximumHeight = maximumHeight; 464 } 465 466 /** 467 This value will usually be set by the layout manager. 468 469 */ 470 public org.apache.myfaces.tobago.layout.Measure getTop() { 471 if (top != null) { 472 return top; 473 } 474 ValueExpression ve = getValueExpression("top"); 475 if (ve != null) { 476 try { 477 Object object = ve.getValue(getFacesContext().getELContext()); 478 return Measure.valueOf(object); 479 } catch (ELException e) { 480 throw new FacesException(e); 481 } 482 } 483 return null; 484 } 485 486 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 487 this.top = top; 488 } 489 490 /** 491 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 492 493 */ 494 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 495 if (currentWidth != null) { 496 return currentWidth; 497 } 498 ValueExpression ve = getValueExpression("currentWidth"); 499 if (ve != null) { 500 try { 501 Object object = ve.getValue(getFacesContext().getELContext()); 502 return Measure.valueOf(object); 503 } catch (ELException e) { 504 throw new FacesException(e); 505 } 506 } 507 return getWidth(); 508 } 509 510 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 511 this.currentWidth = currentWidth; 512 } 513 514 /** 515 This attribute is for internal use only. 516 517 */ 518 public org.apache.myfaces.tobago.layout.Measure getPaddingTop() { 519 if (paddingTop != null) { 520 return paddingTop; 521 } 522 ValueExpression ve = getValueExpression("paddingTop"); 523 if (ve != null) { 524 try { 525 Object object = ve.getValue(getFacesContext().getELContext()); 526 return Measure.valueOf(object); 527 } catch (ELException e) { 528 throw new FacesException(e); 529 } 530 } 531 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 532 getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this); 533 } 534 535 public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) { 536 this.paddingTop = paddingTop; 537 } 538 539 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 540 if (marginTop != null) { 541 return marginTop; 542 } 543 ValueExpression ve = getValueExpression("marginTop"); 544 if (ve != null) { 545 try { 546 Object object = ve.getValue(getFacesContext().getELContext()); 547 return Measure.valueOf(object); 548 } catch (ELException e) { 549 throw new FacesException(e); 550 } 551 } 552 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 553 } 554 555 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 556 this.marginTop = marginTop; 557 } 558 559 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 560 if (marginRight != null) { 561 return marginRight; 562 } 563 ValueExpression ve = getValueExpression("marginRight"); 564 if (ve != null) { 565 try { 566 Object object = ve.getValue(getFacesContext().getELContext()); 567 return Measure.valueOf(object); 568 } catch (ELException e) { 569 throw new FacesException(e); 570 } 571 } 572 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 573 } 574 575 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 576 this.marginRight = marginRight; 577 } 578 579 /** 580 This value will usually be set by the layout manager. 581 582 @deprecated*/ 583 @Deprecated 584 public org.apache.myfaces.tobago.layout.Measure getWidth() { 585 if (width != null) { 586 return width; 587 } 588 ValueExpression ve = getValueExpression("width"); 589 if (ve != null) { 590 try { 591 Object object = ve.getValue(getFacesContext().getELContext()); 592 return Measure.valueOf(object); 593 } catch (ELException e) { 594 throw new FacesException(e); 595 } 596 } 597 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 598 } 599 600 @Deprecated 601 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 602 this.width = width; 603 } 604 605 /** 606 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 607 608 */ 609 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 610 if (currentHeight != null) { 611 return currentHeight; 612 } 613 ValueExpression ve = getValueExpression("currentHeight"); 614 if (ve != null) { 615 try { 616 Object object = ve.getValue(getFacesContext().getELContext()); 617 return Measure.valueOf(object); 618 } catch (ELException e) { 619 throw new FacesException(e); 620 } 621 } 622 return getHeight(); 623 } 624 625 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 626 this.currentHeight = currentHeight; 627 } 628 629 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 630 if (preferredHeight != null) { 631 return preferredHeight; 632 } 633 ValueExpression ve = getValueExpression("preferredHeight"); 634 if (ve != null) { 635 try { 636 Object object = ve.getValue(getFacesContext().getELContext()); 637 return Measure.valueOf(object); 638 } catch (ELException e) { 639 throw new FacesException(e); 640 } 641 } 642 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 643 } 644 645 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 646 this.preferredHeight = preferredHeight; 647 } 648 649 /** 650 This attribute is for internal use only. 651 652 */ 653 public org.apache.myfaces.tobago.layout.Display getDisplay() { 654 if (display != null) { 655 return display; 656 } 657 ValueExpression ve = getValueExpression("display"); 658 if (ve != null) { 659 try { 660 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 661 } catch (ELException e) { 662 throw new FacesException(e); 663 } 664 } 665 return null; 666 } 667 668 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 669 this.display = display; 670 } 671 672 /** 673 Text value to display as label. 674 If text contains an underscore the next character is used as accesskey. 675 676 */ 677 public java.lang.String getLabel() { 678 if (label != null) { 679 return label; 680 } 681 ValueExpression ve = getValueExpression("label"); 682 if (ve != null) { 683 try { 684 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 685 } catch (ELException e) { 686 throw new FacesException(e); 687 } 688 } 689 return null; 690 } 691 692 public void setLabel(java.lang.String label) { 693 this.label = label; 694 } 695 696 /** 697 This attribute is for internal use only. 698 699 */ 700 public org.apache.myfaces.tobago.layout.Measure getBorderBottom() { 701 if (borderBottom != null) { 702 return borderBottom; 703 } 704 ValueExpression ve = getValueExpression("borderBottom"); 705 if (ve != null) { 706 try { 707 Object object = ve.getValue(getFacesContext().getELContext()); 708 return Measure.valueOf(object); 709 } catch (ELException e) { 710 throw new FacesException(e); 711 } 712 } 713 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 714 getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this); 715 } 716 717 public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) { 718 this.borderBottom = borderBottom; 719 } 720 721 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 722 if (maximumWidth != null) { 723 return maximumWidth; 724 } 725 ValueExpression ve = getValueExpression("maximumWidth"); 726 if (ve != null) { 727 try { 728 Object object = ve.getValue(getFacesContext().getELContext()); 729 return Measure.valueOf(object); 730 } catch (ELException e) { 731 throw new FacesException(e); 732 } 733 } 734 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 735 } 736 737 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 738 this.maximumWidth = maximumWidth; 739 } 740 741 /** 742 This attribute is for internal use only. 743 744 */ 745 public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() { 746 if (paddingLeft != null) { 747 return paddingLeft; 748 } 749 ValueExpression ve = getValueExpression("paddingLeft"); 750 if (ve != null) { 751 try { 752 Object object = ve.getValue(getFacesContext().getELContext()); 753 return Measure.valueOf(object); 754 } catch (ELException e) { 755 throw new FacesException(e); 756 } 757 } 758 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 759 getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this); 760 } 761 762 public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) { 763 this.paddingLeft = paddingLeft; 764 } 765 766 /** 767 This attribute is for internal use only. 768 769 */ 770 public org.apache.myfaces.tobago.layout.Measure getPaddingRight() { 771 if (paddingRight != null) { 772 return paddingRight; 773 } 774 ValueExpression ve = getValueExpression("paddingRight"); 775 if (ve != null) { 776 try { 777 Object object = ve.getValue(getFacesContext().getELContext()); 778 return Measure.valueOf(object); 779 } catch (ELException e) { 780 throw new FacesException(e); 781 } 782 } 783 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 784 getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this); 785 } 786 787 public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) { 788 this.paddingRight = paddingRight; 789 } 790 791 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 792 if (preferredWidth != null) { 793 return preferredWidth; 794 } 795 ValueExpression ve = getValueExpression("preferredWidth"); 796 if (ve != null) { 797 try { 798 Object object = ve.getValue(getFacesContext().getELContext()); 799 return Measure.valueOf(object); 800 } catch (ELException e) { 801 throw new FacesException(e); 802 } 803 } 804 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 805 } 806 807 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 808 this.preferredWidth = preferredWidth; 809 } 810 811 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 812 if (marginBottom != null) { 813 return marginBottom; 814 } 815 ValueExpression ve = getValueExpression("marginBottom"); 816 if (ve != null) { 817 try { 818 Object object = ve.getValue(getFacesContext().getELContext()); 819 return Measure.valueOf(object); 820 } catch (ELException e) { 821 throw new FacesException(e); 822 } 823 } 824 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 825 } 826 827 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 828 this.marginBottom = marginBottom; 829 } 830 831 /** 832 This attribute is for internal use only. 833 834 */ 835 public org.apache.myfaces.tobago.layout.Measure getBorderTop() { 836 if (borderTop != null) { 837 return borderTop; 838 } 839 ValueExpression ve = getValueExpression("borderTop"); 840 if (ve != null) { 841 try { 842 Object object = ve.getValue(getFacesContext().getELContext()); 843 return Measure.valueOf(object); 844 } catch (ELException e) { 845 throw new FacesException(e); 846 } 847 } 848 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 849 getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this); 850 } 851 852 public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) { 853 this.borderTop = borderTop; 854 } 855 856 /** 857 This attribute is for internal use only. 858 859 */ 860 public java.lang.Integer getVerticalIndex() { 861 if (verticalIndex != null) { 862 return verticalIndex; 863 } 864 ValueExpression ve = getValueExpression("verticalIndex"); 865 if (ve != null) { 866 try { 867 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 868 if (number != null) { 869 return number.intValue(); 870 } 871 } catch (ELException e) { 872 throw new FacesException(e); 873 } 874 } 875 return null; 876 } 877 878 public void setVerticalIndex(java.lang.Integer verticalIndex) { 879 this.verticalIndex = verticalIndex; 880 } 881 882 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 883 if (currentMarkup != null) { 884 return currentMarkup; 885 } 886 return null; 887 } 888 889 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 890 this.currentMarkup = currentMarkup; 891 } 892 893 /** 894 Absolute URL to an image or image name to lookup in tobago resource path 895 representing the application. In HTML it is used as a favicon. 896 897 */ 898 public java.lang.String getApplicationIcon() { 899 if (applicationIcon != null) { 900 return applicationIcon; 901 } 902 ValueExpression ve = getValueExpression("applicationIcon"); 903 if (ve != null) { 904 try { 905 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 906 } catch (ELException e) { 907 throw new FacesException(e); 908 } 909 } 910 return null; 911 } 912 913 public void setApplicationIcon(java.lang.String applicationIcon) { 914 this.applicationIcon = applicationIcon; 915 } 916 917 /** 918 This attribute is for internal use only. 919 920 */ 921 public java.lang.Integer getHorizontalIndex() { 922 if (horizontalIndex != null) { 923 return horizontalIndex; 924 } 925 ValueExpression ve = getValueExpression("horizontalIndex"); 926 if (ve != null) { 927 try { 928 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 929 if (number != null) { 930 return number.intValue(); 931 } 932 } catch (ELException e) { 933 throw new FacesException(e); 934 } 935 } 936 return null; 937 } 938 939 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 940 this.horizontalIndex = horizontalIndex; 941 } 942 943 public void restoreState(FacesContext context, Object componentState) { 944 Object[] values = (Object[]) componentState; 945 super.restoreState(context, values[0]); 946 markup = (org.apache.myfaces.tobago.context.Markup) values[1]; 947 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2]; 948 state = (java.lang.Object) values[3]; 949 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[4]; 950 focusId = (java.lang.String) values[5]; 951 borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[6]; 952 height = (org.apache.myfaces.tobago.layout.Measure) values[7]; 953 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[8]; 954 overflowX = (java.lang.Boolean) values[9]; 955 rowSpan = (java.lang.Integer) values[10]; 956 overflowY = (java.lang.Boolean) values[11]; 957 left = (org.apache.myfaces.tobago.layout.Measure) values[12]; 958 columnSpan = (java.lang.Integer) values[13]; 959 borderRight = (org.apache.myfaces.tobago.layout.Measure) values[14]; 960 paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[15]; 961 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[16]; 962 top = (org.apache.myfaces.tobago.layout.Measure) values[17]; 963 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[18]; 964 paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[19]; 965 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[20]; 966 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[21]; 967 width = (org.apache.myfaces.tobago.layout.Measure) values[22]; 968 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[23]; 969 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[24]; 970 display = (org.apache.myfaces.tobago.layout.Display) values[25]; 971 label = (java.lang.String) values[26]; 972 borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[27]; 973 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[28]; 974 paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[29]; 975 paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[30]; 976 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[31]; 977 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[32]; 978 borderTop = (org.apache.myfaces.tobago.layout.Measure) values[33]; 979 verticalIndex = (java.lang.Integer) values[34]; 980 applicationIcon = (java.lang.String) values[35]; 981 horizontalIndex = (java.lang.Integer) values[36]; 982 } 983 984 public Object saveState(FacesContext context) { 985 Object[] values = new Object[37]; 986 values[0] = super.saveState(context); 987 values[1] = markup; 988 values[2] = marginLeft; 989 values[3] = state; 990 values[4] = minimumHeight; 991 values[5] = focusId; 992 values[6] = borderLeft; 993 values[7] = height; 994 values[8] = minimumWidth; 995 values[9] = overflowX; 996 values[10] = rowSpan; 997 values[11] = overflowY; 998 values[12] = left; 999 values[13] = columnSpan; 1000 values[14] = borderRight; 1001 values[15] = paddingBottom; 1002 values[16] = maximumHeight; 1003 values[17] = top; 1004 values[18] = currentWidth; 1005 values[19] = paddingTop; 1006 values[20] = marginTop; 1007 values[21] = marginRight; 1008 values[22] = width; 1009 values[23] = currentHeight; 1010 values[24] = preferredHeight; 1011 values[25] = display; 1012 values[26] = label; 1013 values[27] = borderBottom; 1014 values[28] = maximumWidth; 1015 values[29] = paddingLeft; 1016 values[30] = paddingRight; 1017 values[31] = preferredWidth; 1018 values[32] = marginBottom; 1019 values[33] = borderTop; 1020 values[34] = verticalIndex; 1021 values[35] = applicationIcon; 1022 values[36] = horizontalIndex; 1023 currentMarkup = null; 1024 return values; 1025 } 1026 1027 1028 }