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.component.ActionSource; 023 import javax.faces.component.ActionSource2; 024 import javax.faces.context.FacesContext; 025 import javax.faces.el.MethodBinding; 026 import org.apache.myfaces.tobago.context.Markup; 027 import org.apache.myfaces.tobago.internal.component.AbstractUITabGroup; 028 import org.apache.myfaces.tobago.layout.Display; 029 import org.apache.myfaces.tobago.layout.Measure; 030 import org.apache.commons.lang.ArrayUtils; 031 import org.apache.commons.lang.StringUtils; 032 import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression; 033 import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding; 034 import org.apache.myfaces.tobago.internal.util.Deprecation; 035 import org.apache.myfaces.tobago.renderkit.MarginValues; 036 import org.apache.myfaces.tobago.renderkit.SpacingValues; 037 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer; 038 import javax.el.ELException; 039 import javax.faces.FacesException; 040 import java.util.ArrayList; 041 import java.util.List; 042 import javax.el.MethodExpression; 043 import javax.el.ValueExpression; 044 045 /** 046 Renders a tab group which contains tab panels. 047 * UIComponent class, generated from template {@code component1.2.stg} with class 048 * {@link org.apache.myfaces.tobago.internal.taglib.component.TabGroupTagDeclaration}. 049 */ 050 public class UITabGroup 051 extends AbstractUITabGroup implements ActionSource, ActionSource2, SupportsMarkup { 052 053 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TabGroup"; 054 055 private javax.faces.el.MethodBinding actionListener; 056 private org.apache.myfaces.tobago.context.Markup markup; 057 private java.lang.Integer renderedIndex; 058 private org.apache.myfaces.tobago.layout.Measure marginLeft; 059 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 060 private org.apache.myfaces.tobago.layout.Measure borderLeft; 061 private org.apache.myfaces.tobago.layout.Measure height; 062 private org.apache.myfaces.tobago.layout.Measure minimumWidth; 063 private java.lang.Boolean overflowX; 064 065 private javax.el.MethodExpression actionExpression; 066 private java.lang.Integer rowSpan; 067 private java.lang.Boolean overflowY; 068 private org.apache.myfaces.tobago.layout.Measure left; 069 private java.lang.Integer columnSpan; 070 private org.apache.myfaces.tobago.layout.Measure borderRight; 071 private java.lang.Boolean showNavigationBar; 072 private org.apache.myfaces.tobago.layout.Measure paddingBottom; 073 private javax.faces.el.MethodBinding tabChangeListener; 074 private org.apache.myfaces.tobago.layout.Measure maximumHeight; 075 private org.apache.myfaces.tobago.layout.Measure top; 076 private org.apache.myfaces.tobago.layout.Measure currentWidth; 077 private java.lang.Integer selectedIndex; 078 private org.apache.myfaces.tobago.layout.Measure paddingTop; 079 private org.apache.myfaces.tobago.layout.Measure marginTop; 080 private org.apache.myfaces.tobago.layout.Measure width; 081 private org.apache.myfaces.tobago.layout.Measure marginRight; 082 private org.apache.myfaces.tobago.layout.Measure currentHeight; 083 private org.apache.myfaces.tobago.layout.Measure preferredHeight; 084 private org.apache.myfaces.tobago.layout.Measure borderBottom; 085 private org.apache.myfaces.tobago.layout.Display display; 086 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 087 private org.apache.myfaces.tobago.layout.Measure paddingLeft; 088 private org.apache.myfaces.tobago.layout.Measure paddingRight; 089 private org.apache.myfaces.tobago.layout.Measure preferredWidth; 090 private java.lang.String switchType; 091 private org.apache.myfaces.tobago.layout.Measure marginBottom; 092 private java.lang.Boolean immediate; 093 private org.apache.myfaces.tobago.layout.Measure borderTop; 094 private java.lang.Integer verticalIndex; 095 private java.lang.String[] renderedPartially; 096 private org.apache.myfaces.tobago.context.Markup currentMarkup; 097 private java.lang.Integer horizontalIndex; 098 099 100 public javax.faces.el.MethodBinding getActionListener() { 101 return actionListener; 102 } 103 104 public void setActionListener(javax.faces.el.MethodBinding actionListener) { 105 this.actionListener = actionListener; 106 } 107 108 public org.apache.myfaces.tobago.context.Markup getMarkup() { 109 if (markup != null) { 110 return markup; 111 } 112 ValueExpression ve = getValueExpression("markup"); 113 if (ve != null) { 114 try { 115 Object object = ve.getValue(getFacesContext().getELContext()); 116 return Markup.valueOf(object); 117 } catch (ELException e) { 118 throw new FacesException(e); 119 } 120 } 121 return null; 122 } 123 124 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) { 125 this.markup = markup; 126 } 127 128 /** 129 For internal use. TODO: Check if this long needed 130 <br />Default: <code>0</code> 131 */ 132 public java.lang.Integer getRenderedIndex() { 133 if (renderedIndex != null) { 134 return renderedIndex; 135 } 136 ValueExpression ve = getValueExpression("renderedIndex"); 137 if (ve != null) { 138 try { 139 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 140 if (number != null) { 141 return number.intValue(); 142 } 143 } catch (ELException e) { 144 throw new FacesException(e); 145 } 146 } 147 return 0; 148 } 149 150 public void setRenderedIndex(java.lang.Integer renderedIndex) { 151 this.renderedIndex = renderedIndex; 152 } 153 154 public org.apache.myfaces.tobago.layout.Measure getMarginLeft() { 155 if (marginLeft != null) { 156 return marginLeft; 157 } 158 ValueExpression ve = getValueExpression("marginLeft"); 159 if (ve != null) { 160 try { 161 Object object = ve.getValue(getFacesContext().getELContext()); 162 return Measure.valueOf(object); 163 } catch (ELException e) { 164 throw new FacesException(e); 165 } 166 } 167 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this); 168 } 169 170 public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) { 171 this.marginLeft = marginLeft; 172 } 173 174 public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() { 175 if (minimumHeight != null) { 176 return minimumHeight; 177 } 178 ValueExpression ve = getValueExpression("minimumHeight"); 179 if (ve != null) { 180 try { 181 Object object = ve.getValue(getFacesContext().getELContext()); 182 return Measure.valueOf(object); 183 } catch (ELException e) { 184 throw new FacesException(e); 185 } 186 } 187 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this); 188 } 189 190 public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) { 191 this.minimumHeight = minimumHeight; 192 } 193 194 /** 195 This attribute is for internal use only. 196 197 */ 198 public org.apache.myfaces.tobago.layout.Measure getBorderLeft() { 199 if (borderLeft != null) { 200 return borderLeft; 201 } 202 ValueExpression ve = getValueExpression("borderLeft"); 203 if (ve != null) { 204 try { 205 Object object = ve.getValue(getFacesContext().getELContext()); 206 return Measure.valueOf(object); 207 } catch (ELException e) { 208 throw new FacesException(e); 209 } 210 } 211 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 212 getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this); 213 } 214 215 public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) { 216 this.borderLeft = borderLeft; 217 } 218 219 /** 220 This value will usually be set by the layout manager. 221 222 */ 223 public org.apache.myfaces.tobago.layout.Measure getHeight() { 224 if (height != null) { 225 return height; 226 } 227 ValueExpression ve = getValueExpression("height"); 228 if (ve != null) { 229 try { 230 Object object = ve.getValue(getFacesContext().getELContext()); 231 return Measure.valueOf(object); 232 } catch (ELException e) { 233 throw new FacesException(e); 234 } 235 } 236 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 237 } 238 239 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 240 this.height = height; 241 } 242 243 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 244 if (minimumWidth != null) { 245 return minimumWidth; 246 } 247 ValueExpression ve = getValueExpression("minimumWidth"); 248 if (ve != null) { 249 try { 250 Object object = ve.getValue(getFacesContext().getELContext()); 251 return Measure.valueOf(object); 252 } catch (ELException e) { 253 throw new FacesException(e); 254 } 255 } 256 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 257 } 258 259 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 260 this.minimumWidth = minimumWidth; 261 } 262 263 /** 264 This attribute is for internal use only. 265 266 */ 267 public boolean isOverflowX() { 268 if (overflowX != null) { 269 return overflowX; 270 } 271 ValueExpression ve = getValueExpression("overflowX"); 272 if (ve != null) { 273 try { 274 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 275 if (bool != null) { 276 return bool; 277 } 278 } catch (ELException e) { 279 throw new FacesException(e); 280 } 281 } 282 return false; 283 } 284 285 public void setOverflowX(boolean overflowX) { 286 this.overflowX = overflowX; 287 } 288 289 public javax.faces.el.MethodBinding getAction() { 290 MethodExpression expression = getActionExpression(); 291 if (expression instanceof MethodBindingToMethodExpression) { 292 return ((MethodBindingToMethodExpression)expression).getMethodBinding(); 293 } 294 if (expression != null) { 295 return new MethodExpressionToMethodBinding(expression); 296 } 297 return null; 298 } 299 300 public void setAction(javax.faces.el.MethodBinding action) { 301 if (action != null) { 302 setActionExpression(new MethodBindingToMethodExpression(action)); 303 } else { 304 setActionExpression(null); 305 } 306 } 307 308 public javax.el.MethodExpression getActionExpression() { 309 return actionExpression; 310 } 311 312 public void setActionExpression(javax.el.MethodExpression actionExpression) { 313 this.actionExpression = actionExpression; 314 } 315 316 public java.lang.Integer getRowSpan() { 317 if (rowSpan != null) { 318 return rowSpan; 319 } 320 ValueExpression ve = getValueExpression("rowSpan"); 321 if (ve != null) { 322 try { 323 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 324 if (number != null) { 325 return number.intValue(); 326 } 327 } catch (ELException e) { 328 throw new FacesException(e); 329 } 330 } 331 return 1; 332 } 333 334 public void setRowSpan(java.lang.Integer rowSpan) { 335 this.rowSpan = rowSpan; 336 } 337 338 /** 339 This attribute is for internal use only. 340 341 */ 342 public boolean isOverflowY() { 343 if (overflowY != null) { 344 return overflowY; 345 } 346 ValueExpression ve = getValueExpression("overflowY"); 347 if (ve != null) { 348 try { 349 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 350 if (bool != null) { 351 return bool; 352 } 353 } catch (ELException e) { 354 throw new FacesException(e); 355 } 356 } 357 return false; 358 } 359 360 public void setOverflowY(boolean overflowY) { 361 this.overflowY = overflowY; 362 } 363 364 /** 365 This value will usually be set by the layout manager. 366 367 */ 368 public org.apache.myfaces.tobago.layout.Measure getLeft() { 369 if (left != null) { 370 return left; 371 } 372 ValueExpression ve = getValueExpression("left"); 373 if (ve != null) { 374 try { 375 Object object = ve.getValue(getFacesContext().getELContext()); 376 return Measure.valueOf(object); 377 } catch (ELException e) { 378 throw new FacesException(e); 379 } 380 } 381 return null; 382 } 383 384 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 385 this.left = left; 386 } 387 388 public java.lang.Integer getColumnSpan() { 389 if (columnSpan != null) { 390 return columnSpan; 391 } 392 ValueExpression ve = getValueExpression("columnSpan"); 393 if (ve != null) { 394 try { 395 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 396 if (number != null) { 397 return number.intValue(); 398 } 399 } catch (ELException e) { 400 throw new FacesException(e); 401 } 402 } 403 return 1; 404 } 405 406 public void setColumnSpan(java.lang.Integer columnSpan) { 407 this.columnSpan = columnSpan; 408 } 409 410 /** 411 This attribute is for internal use only. 412 413 */ 414 public org.apache.myfaces.tobago.layout.Measure getBorderRight() { 415 if (borderRight != null) { 416 return borderRight; 417 } 418 ValueExpression ve = getValueExpression("borderRight"); 419 if (ve != null) { 420 try { 421 Object object = ve.getValue(getFacesContext().getELContext()); 422 return Measure.valueOf(object); 423 } catch (ELException e) { 424 throw new FacesException(e); 425 } 426 } 427 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 428 getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this); 429 } 430 431 public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) { 432 this.borderRight = borderRight; 433 } 434 435 /** 436 Flag indicating that the tab navigation bar is rendered. 437 <br />Default: <code>true</code> 438 */ 439 public boolean isShowNavigationBar() { 440 if (showNavigationBar != null) { 441 return showNavigationBar; 442 } 443 ValueExpression ve = getValueExpression("showNavigationBar"); 444 if (ve != null) { 445 try { 446 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 447 if (bool != null) { 448 return bool; 449 } 450 } catch (ELException e) { 451 throw new FacesException(e); 452 } 453 } 454 return true; 455 } 456 457 public void setShowNavigationBar(boolean showNavigationBar) { 458 this.showNavigationBar = showNavigationBar; 459 } 460 461 /** 462 This attribute is for internal use only. 463 464 */ 465 public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() { 466 if (paddingBottom != null) { 467 return paddingBottom; 468 } 469 ValueExpression ve = getValueExpression("paddingBottom"); 470 if (ve != null) { 471 try { 472 Object object = ve.getValue(getFacesContext().getELContext()); 473 return Measure.valueOf(object); 474 } catch (ELException e) { 475 throw new FacesException(e); 476 } 477 } 478 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 479 getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this); 480 } 481 482 public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) { 483 this.paddingBottom = paddingBottom; 484 } 485 486 public javax.faces.el.MethodBinding getTabChangeListener() { 487 return tabChangeListener; 488 } 489 490 public void setTabChangeListener(javax.faces.el.MethodBinding tabChangeListener) { 491 this.tabChangeListener = tabChangeListener; 492 } 493 494 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 495 if (maximumHeight != null) { 496 return maximumHeight; 497 } 498 ValueExpression ve = getValueExpression("maximumHeight"); 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 ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 508 } 509 510 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 511 this.maximumHeight = maximumHeight; 512 } 513 514 /** 515 This value will usually be set by the layout manager. 516 517 */ 518 public org.apache.myfaces.tobago.layout.Measure getTop() { 519 if (top != null) { 520 return top; 521 } 522 ValueExpression ve = getValueExpression("top"); 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 null; 532 } 533 534 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 535 this.top = top; 536 } 537 538 /** 539 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 540 541 */ 542 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 543 if (currentWidth != null) { 544 return currentWidth; 545 } 546 ValueExpression ve = getValueExpression("currentWidth"); 547 if (ve != null) { 548 try { 549 Object object = ve.getValue(getFacesContext().getELContext()); 550 return Measure.valueOf(object); 551 } catch (ELException e) { 552 throw new FacesException(e); 553 } 554 } 555 return getWidth(); 556 } 557 558 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 559 this.currentWidth = currentWidth; 560 } 561 562 /** 563 <strong>ValueBindingExpression</strong> pointing to a Integer to save the 564 component's selected Tab. 565 <br />Default: <code>0</code> 566 */ 567 public java.lang.Integer getSelectedIndex() { 568 if (selectedIndex != null) { 569 return selectedIndex; 570 } 571 ValueExpression ve = getValueExpression("selectedIndex"); 572 if (ve != null) { 573 try { 574 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 575 if (number != null) { 576 return number.intValue(); 577 } 578 } catch (ELException e) { 579 throw new FacesException(e); 580 } 581 } 582 return 0; 583 } 584 585 public void setSelectedIndex(java.lang.Integer selectedIndex) { 586 this.selectedIndex = selectedIndex; 587 } 588 589 /** 590 This attribute is for internal use only. 591 592 */ 593 public org.apache.myfaces.tobago.layout.Measure getPaddingTop() { 594 if (paddingTop != null) { 595 return paddingTop; 596 } 597 ValueExpression ve = getValueExpression("paddingTop"); 598 if (ve != null) { 599 try { 600 Object object = ve.getValue(getFacesContext().getELContext()); 601 return Measure.valueOf(object); 602 } catch (ELException e) { 603 throw new FacesException(e); 604 } 605 } 606 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 607 getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this); 608 } 609 610 public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) { 611 this.paddingTop = paddingTop; 612 } 613 614 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 615 if (marginTop != null) { 616 return marginTop; 617 } 618 ValueExpression ve = getValueExpression("marginTop"); 619 if (ve != null) { 620 try { 621 Object object = ve.getValue(getFacesContext().getELContext()); 622 return Measure.valueOf(object); 623 } catch (ELException e) { 624 throw new FacesException(e); 625 } 626 } 627 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 628 } 629 630 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 631 this.marginTop = marginTop; 632 } 633 634 /** 635 This value will usually be set by the layout manager. 636 637 */ 638 public org.apache.myfaces.tobago.layout.Measure getWidth() { 639 if (width != null) { 640 return width; 641 } 642 ValueExpression ve = getValueExpression("width"); 643 if (ve != null) { 644 try { 645 Object object = ve.getValue(getFacesContext().getELContext()); 646 return Measure.valueOf(object); 647 } catch (ELException e) { 648 throw new FacesException(e); 649 } 650 } 651 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 652 } 653 654 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 655 this.width = width; 656 } 657 658 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 659 if (marginRight != null) { 660 return marginRight; 661 } 662 ValueExpression ve = getValueExpression("marginRight"); 663 if (ve != null) { 664 try { 665 Object object = ve.getValue(getFacesContext().getELContext()); 666 return Measure.valueOf(object); 667 } catch (ELException e) { 668 throw new FacesException(e); 669 } 670 } 671 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 672 } 673 674 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 675 this.marginRight = marginRight; 676 } 677 678 /** 679 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 680 681 */ 682 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 683 if (currentHeight != null) { 684 return currentHeight; 685 } 686 ValueExpression ve = getValueExpression("currentHeight"); 687 if (ve != null) { 688 try { 689 Object object = ve.getValue(getFacesContext().getELContext()); 690 return Measure.valueOf(object); 691 } catch (ELException e) { 692 throw new FacesException(e); 693 } 694 } 695 return getHeight(); 696 } 697 698 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 699 this.currentHeight = currentHeight; 700 } 701 702 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 703 if (preferredHeight != null) { 704 return preferredHeight; 705 } 706 ValueExpression ve = getValueExpression("preferredHeight"); 707 if (ve != null) { 708 try { 709 Object object = ve.getValue(getFacesContext().getELContext()); 710 return Measure.valueOf(object); 711 } catch (ELException e) { 712 throw new FacesException(e); 713 } 714 } 715 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 716 } 717 718 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 719 this.preferredHeight = preferredHeight; 720 } 721 722 /** 723 This attribute is for internal use only. 724 725 */ 726 public org.apache.myfaces.tobago.layout.Measure getBorderBottom() { 727 if (borderBottom != null) { 728 return borderBottom; 729 } 730 ValueExpression ve = getValueExpression("borderBottom"); 731 if (ve != null) { 732 try { 733 Object object = ve.getValue(getFacesContext().getELContext()); 734 return Measure.valueOf(object); 735 } catch (ELException e) { 736 throw new FacesException(e); 737 } 738 } 739 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 740 getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this); 741 } 742 743 public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) { 744 this.borderBottom = borderBottom; 745 } 746 747 /** 748 This attribute is for internal use only. 749 750 */ 751 public org.apache.myfaces.tobago.layout.Display getDisplay() { 752 if (display != null) { 753 return display; 754 } 755 ValueExpression ve = getValueExpression("display"); 756 if (ve != null) { 757 try { 758 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 759 } catch (ELException e) { 760 throw new FacesException(e); 761 } 762 } 763 return null; 764 } 765 766 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 767 this.display = display; 768 } 769 770 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 771 if (maximumWidth != null) { 772 return maximumWidth; 773 } 774 ValueExpression ve = getValueExpression("maximumWidth"); 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 ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 784 } 785 786 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 787 this.maximumWidth = maximumWidth; 788 } 789 790 /** 791 This attribute is for internal use only. 792 793 */ 794 public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() { 795 if (paddingLeft != null) { 796 return paddingLeft; 797 } 798 ValueExpression ve = getValueExpression("paddingLeft"); 799 if (ve != null) { 800 try { 801 Object object = ve.getValue(getFacesContext().getELContext()); 802 return Measure.valueOf(object); 803 } catch (ELException e) { 804 throw new FacesException(e); 805 } 806 } 807 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 808 getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this); 809 } 810 811 public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) { 812 this.paddingLeft = paddingLeft; 813 } 814 815 /** 816 This attribute is for internal use only. 817 818 */ 819 public org.apache.myfaces.tobago.layout.Measure getPaddingRight() { 820 if (paddingRight != null) { 821 return paddingRight; 822 } 823 ValueExpression ve = getValueExpression("paddingRight"); 824 if (ve != null) { 825 try { 826 Object object = ve.getValue(getFacesContext().getELContext()); 827 return Measure.valueOf(object); 828 } catch (ELException e) { 829 throw new FacesException(e); 830 } 831 } 832 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 833 getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this); 834 } 835 836 public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) { 837 this.paddingRight = paddingRight; 838 } 839 840 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 841 if (preferredWidth != null) { 842 return preferredWidth; 843 } 844 ValueExpression ve = getValueExpression("preferredWidth"); 845 if (ve != null) { 846 try { 847 Object object = ve.getValue(getFacesContext().getELContext()); 848 return Measure.valueOf(object); 849 } catch (ELException e) { 850 throw new FacesException(e); 851 } 852 } 853 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 854 } 855 856 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 857 this.preferredWidth = preferredWidth; 858 } 859 860 /** 861 Indicating how tab switching should be done. 862 <p/> 863 Possible values are: 864 <dl> 865 <dt>client</dt> 866 <dd>Tab switching is done on client, no server Request.</dd> 867 <dt>reloadPage</dt> 868 <dd>Tab switching is done by server request. Full page is reloaded.</dd> 869 <dt>reloadTab</dt> 870 <dd>Tab switching is done by server request. Only the Tab is reloaded.</dd> 871 </dl> 872 <br />Default: <code>client</code><br />Allowed Values: <code>client,reloadPage,reloadTab</code> 873 */ 874 public java.lang.String getSwitchType() { 875 if (switchType != null) { 876 return switchType; 877 } 878 ValueExpression ve = getValueExpression("switchType"); 879 if (ve != null) { 880 try { 881 java.lang.String switchType = (java.lang.String) ve.getValue(getFacesContext().getELContext()); 882 if (switchType != null) { 883 return switchType; 884 } 885 } catch (ELException e) { 886 throw new FacesException(e); 887 } 888 } 889 return "client"; 890 } 891 892 public void setSwitchType(java.lang.String switchType) { 893 this.switchType = switchType; 894 } 895 896 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 897 if (marginBottom != null) { 898 return marginBottom; 899 } 900 ValueExpression ve = getValueExpression("marginBottom"); 901 if (ve != null) { 902 try { 903 Object object = ve.getValue(getFacesContext().getELContext()); 904 return Measure.valueOf(object); 905 } catch (ELException e) { 906 throw new FacesException(e); 907 } 908 } 909 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 910 } 911 912 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 913 this.marginBottom = marginBottom; 914 } 915 916 /** 917 Flag indicating that, if this component is activated by the user, 918 notifications should be delivered to interested listeners and actions 919 immediately (that is, during Apply Request Values phase) rather than 920 waiting until Invoke Application phase. 921 <br />Default: <code>false</code> 922 */ 923 public boolean isImmediate() { 924 if (immediate != null) { 925 return immediate; 926 } 927 ValueExpression ve = getValueExpression("immediate"); 928 if (ve != null) { 929 try { 930 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 931 if (bool != null) { 932 return bool; 933 } 934 } catch (ELException e) { 935 throw new FacesException(e); 936 } 937 } 938 return false; 939 } 940 941 public void setImmediate(boolean immediate) { 942 this.immediate = immediate; 943 } 944 945 /** 946 This attribute is for internal use only. 947 948 */ 949 public org.apache.myfaces.tobago.layout.Measure getBorderTop() { 950 if (borderTop != null) { 951 return borderTop; 952 } 953 ValueExpression ve = getValueExpression("borderTop"); 954 if (ve != null) { 955 try { 956 Object object = ve.getValue(getFacesContext().getELContext()); 957 return Measure.valueOf(object); 958 } catch (ELException e) { 959 throw new FacesException(e); 960 } 961 } 962 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 963 getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this); 964 } 965 966 public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) { 967 this.borderTop = borderTop; 968 } 969 970 /** 971 This attribute is for internal use only. 972 973 */ 974 public java.lang.Integer getVerticalIndex() { 975 if (verticalIndex != null) { 976 return verticalIndex; 977 } 978 ValueExpression ve = getValueExpression("verticalIndex"); 979 if (ve != null) { 980 try { 981 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 982 if (number != null) { 983 return number.intValue(); 984 } 985 } catch (ELException e) { 986 throw new FacesException(e); 987 } 988 } 989 return null; 990 } 991 992 public void setVerticalIndex(java.lang.Integer verticalIndex) { 993 this.verticalIndex = verticalIndex; 994 } 995 996 /** 997 Indicate the partially rendered Components in a case of a submit. 998 999 */ 1000 public String[] getRenderedPartially() { 1001 if (renderedPartially != null) { 1002 return renderedPartially; 1003 } 1004 ValueExpression ve = getValueExpression("renderedPartially"); 1005 if (ve != null) { 1006 try { 1007 Object strArray = ve.getValue(getFacesContext().getELContext()); 1008 if (strArray instanceof String[]) { 1009 return (String[]) strArray; 1010 } else if (strArray instanceof String) { 1011 String[] strings = StringUtils.split((String) strArray, ", "); 1012 List<String> result = new ArrayList<String>(strings.length); 1013 for (String string : strings) { 1014 if (string.trim().length() != 0) { 1015 result.add(string.trim()); 1016 } 1017 } 1018 return result.toArray(new String[result.size()]); 1019 } else if (strArray == null) { 1020 return ArrayUtils.EMPTY_STRING_ARRAY; 1021 } else { 1022 return new String[]{strArray.toString()}; 1023 } 1024 } catch (ELException e) { 1025 throw new FacesException(e); 1026 } 1027 } 1028 return ArrayUtils.EMPTY_STRING_ARRAY; 1029 } 1030 1031 public void setRenderedPartially(String[] renderedPartially) { 1032 this.renderedPartially = renderedPartially; 1033 } 1034 1035 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 1036 if (currentMarkup != null) { 1037 return currentMarkup; 1038 } 1039 return null; 1040 } 1041 1042 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 1043 this.currentMarkup = currentMarkup; 1044 } 1045 1046 /** 1047 This attribute is for internal use only. 1048 1049 */ 1050 public java.lang.Integer getHorizontalIndex() { 1051 if (horizontalIndex != null) { 1052 return horizontalIndex; 1053 } 1054 ValueExpression ve = getValueExpression("horizontalIndex"); 1055 if (ve != null) { 1056 try { 1057 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 1058 if (number != null) { 1059 return number.intValue(); 1060 } 1061 } catch (ELException e) { 1062 throw new FacesException(e); 1063 } 1064 } 1065 return null; 1066 } 1067 1068 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 1069 this.horizontalIndex = horizontalIndex; 1070 } 1071 1072 public void restoreState(FacesContext context, Object componentState) { 1073 Object[] values = (Object[]) componentState; 1074 super.restoreState(context, values[0]); 1075 actionListener = (javax.faces.el.MethodBinding) restoreAttachedState(context, values[1]); 1076 markup = (org.apache.myfaces.tobago.context.Markup) values[2]; 1077 renderedIndex = (java.lang.Integer) values[3]; 1078 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[4]; 1079 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[5]; 1080 borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[6]; 1081 height = (org.apache.myfaces.tobago.layout.Measure) values[7]; 1082 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[8]; 1083 overflowX = (java.lang.Boolean) values[9]; 1084 1085 actionExpression = (javax.el.MethodExpression) restoreAttachedState(context, values[10]); 1086 rowSpan = (java.lang.Integer) values[11]; 1087 overflowY = (java.lang.Boolean) values[12]; 1088 left = (org.apache.myfaces.tobago.layout.Measure) values[13]; 1089 columnSpan = (java.lang.Integer) values[14]; 1090 borderRight = (org.apache.myfaces.tobago.layout.Measure) values[15]; 1091 showNavigationBar = (java.lang.Boolean) values[16]; 1092 paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[17]; 1093 tabChangeListener = (javax.faces.el.MethodBinding) restoreAttachedState(context, values[18]); 1094 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[19]; 1095 top = (org.apache.myfaces.tobago.layout.Measure) values[20]; 1096 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[21]; 1097 selectedIndex = (java.lang.Integer) values[22]; 1098 paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[23]; 1099 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[24]; 1100 width = (org.apache.myfaces.tobago.layout.Measure) values[25]; 1101 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[26]; 1102 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[27]; 1103 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[28]; 1104 borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[29]; 1105 display = (org.apache.myfaces.tobago.layout.Display) values[30]; 1106 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[31]; 1107 paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[32]; 1108 paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[33]; 1109 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[34]; 1110 switchType = (java.lang.String) values[35]; 1111 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[36]; 1112 immediate = (java.lang.Boolean) values[37]; 1113 borderTop = (org.apache.myfaces.tobago.layout.Measure) values[38]; 1114 verticalIndex = (java.lang.Integer) values[39]; 1115 renderedPartially = (java.lang.String[]) values[40]; 1116 horizontalIndex = (java.lang.Integer) values[41]; 1117 } 1118 1119 public Object saveState(FacesContext context) { 1120 Object[] values = new Object[42]; 1121 values[0] = super.saveState(context); 1122 values[1] = saveAttachedState(context, actionListener); 1123 values[2] = markup; 1124 values[3] = renderedIndex; 1125 values[4] = marginLeft; 1126 values[5] = minimumHeight; 1127 values[6] = borderLeft; 1128 values[7] = height; 1129 values[8] = minimumWidth; 1130 values[9] = overflowX; 1131 1132 values[10] = saveAttachedState(context, actionExpression); 1133 values[11] = rowSpan; 1134 values[12] = overflowY; 1135 values[13] = left; 1136 values[14] = columnSpan; 1137 values[15] = borderRight; 1138 values[16] = showNavigationBar; 1139 values[17] = paddingBottom; 1140 values[18] = saveAttachedState(context, tabChangeListener); 1141 values[19] = maximumHeight; 1142 values[20] = top; 1143 values[21] = currentWidth; 1144 values[22] = selectedIndex; 1145 values[23] = paddingTop; 1146 values[24] = marginTop; 1147 values[25] = width; 1148 values[26] = marginRight; 1149 values[27] = currentHeight; 1150 values[28] = preferredHeight; 1151 values[29] = borderBottom; 1152 values[30] = display; 1153 values[31] = maximumWidth; 1154 values[32] = paddingLeft; 1155 values[33] = paddingRight; 1156 values[34] = preferredWidth; 1157 values[35] = switchType; 1158 values[36] = marginBottom; 1159 values[37] = immediate; 1160 values[38] = borderTop; 1161 values[39] = verticalIndex; 1162 values[40] = renderedPartially; 1163 values[41] = horizontalIndex; 1164 currentMarkup = null; 1165 return values; 1166 } 1167 1168 1169 }