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.AbstractUISelectMany; 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 Render a multi selection option listbox. 044 * UIComponent class, generated from template {@code component1.2.stg} with class 045 * {@link org.apache.myfaces.tobago.internal.taglib.component.SelectManyListboxTagDeclaration}. 046 */ 047 public class UISelectManyListbox 048 extends AbstractUISelectMany implements SupportsMarkup { 049 050 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.SelectManyListbox"; 051 052 private org.apache.myfaces.tobago.context.Markup markup; 053 private java.lang.Character accessKey; 054 private org.apache.myfaces.tobago.layout.Measure marginLeft; 055 private java.lang.String labelWithAccessKey; 056 private java.lang.Integer tabIndex; 057 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 058 private java.lang.String tip; 059 private org.apache.myfaces.tobago.layout.Measure height; 060 private org.apache.myfaces.tobago.layout.Measure minimumWidth; 061 private java.lang.Boolean inline; 062 private java.lang.Integer rowSpan; 063 private java.lang.Boolean focus; 064 private org.apache.myfaces.tobago.layout.Measure left; 065 private java.lang.Integer columnSpan; 066 private java.lang.Boolean required; 067 private org.apache.myfaces.tobago.layout.Measure top; 068 private org.apache.myfaces.tobago.layout.Measure maximumHeight; 069 private org.apache.myfaces.tobago.layout.Measure currentWidth; 070 private org.apache.myfaces.tobago.layout.Measure marginTop; 071 private org.apache.myfaces.tobago.layout.Measure width; 072 private org.apache.myfaces.tobago.layout.Measure marginRight; 073 private org.apache.myfaces.tobago.layout.Measure currentHeight; 074 private org.apache.myfaces.tobago.layout.Measure preferredHeight; 075 private java.lang.String label; 076 private org.apache.myfaces.tobago.layout.Display display; 077 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 078 private java.lang.String onchange; 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.Boolean readonly; 085 private java.lang.Boolean disabled; 086 087 088 public org.apache.myfaces.tobago.context.Markup getMarkup() { 089 if (markup != null) { 090 return markup; 091 } 092 ValueExpression ve = getValueExpression("markup"); 093 if (ve != null) { 094 try { 095 Object object = ve.getValue(getFacesContext().getELContext()); 096 return Markup.valueOf(object); 097 } catch (ELException e) { 098 throw new FacesException(e); 099 } 100 } 101 return null; 102 } 103 104 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) { 105 this.markup = markup; 106 } 107 108 /** 109 Deprecated! Has not longer any function. 110 111 @deprecated*/ 112 @Deprecated 113 public java.lang.Character getAccessKey() { 114 if (accessKey != null) { 115 return accessKey; 116 } 117 ValueExpression ve = getValueExpression("accessKey"); 118 if (ve != null) { 119 try { 120 return (java.lang.Character) ve.getValue(getFacesContext().getELContext()); 121 } catch (ELException e) { 122 throw new FacesException(e); 123 } 124 } 125 return null; 126 } 127 128 @Deprecated 129 public void setAccessKey(java.lang.Character accessKey) { 130 this.accessKey = accessKey; 131 } 132 133 public org.apache.myfaces.tobago.layout.Measure getMarginLeft() { 134 if (marginLeft != null) { 135 return marginLeft; 136 } 137 ValueExpression ve = getValueExpression("marginLeft"); 138 if (ve != null) { 139 try { 140 Object object = ve.getValue(getFacesContext().getELContext()); 141 return Measure.valueOf(object); 142 } catch (ELException e) { 143 throw new FacesException(e); 144 } 145 } 146 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this); 147 } 148 149 public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) { 150 this.marginLeft = marginLeft; 151 } 152 153 /** 154 Deprecated! Use 'label' instead. 155 Text value to display as label. 156 If text contains an underscore the next character overwrites 'accesskey'. 157 158 @deprecated*/ 159 @Deprecated 160 public java.lang.String getLabelWithAccessKey() { 161 if (labelWithAccessKey != null) { 162 return labelWithAccessKey; 163 } 164 ValueExpression ve = getValueExpression("labelWithAccessKey"); 165 if (ve != null) { 166 try { 167 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 168 } catch (ELException e) { 169 throw new FacesException(e); 170 } 171 } 172 return null; 173 } 174 175 @Deprecated 176 public void setLabelWithAccessKey(java.lang.String labelWithAccessKey) { 177 this.labelWithAccessKey = labelWithAccessKey; 178 } 179 180 /** 181 Controls the navigation of the focus through the 182 input controls on a page with the Tab-Key. 183 The navigation starts from the element with 184 the lowest tabIndex value to the element with the highest value. 185 Elements that have identical tabIndex values should be navigated 186 in the order they appear in the character stream 187 Elements that are disabled or with a negative tabIndex 188 do not participate in the tabbing order. 189 190 */ 191 public java.lang.Integer getTabIndex() { 192 if (tabIndex != null) { 193 return tabIndex; 194 } 195 ValueExpression ve = getValueExpression("tabIndex"); 196 if (ve != null) { 197 try { 198 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 199 if (number != null) { 200 return number.intValue(); 201 } 202 } catch (ELException e) { 203 throw new FacesException(e); 204 } 205 } 206 return null; 207 } 208 209 public void setTabIndex(java.lang.Integer tabIndex) { 210 this.tabIndex = tabIndex; 211 } 212 213 public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() { 214 if (minimumHeight != null) { 215 return minimumHeight; 216 } 217 ValueExpression ve = getValueExpression("minimumHeight"); 218 if (ve != null) { 219 try { 220 Object object = ve.getValue(getFacesContext().getELContext()); 221 return Measure.valueOf(object); 222 } catch (ELException e) { 223 throw new FacesException(e); 224 } 225 } 226 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this); 227 } 228 229 public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) { 230 this.minimumHeight = minimumHeight; 231 } 232 233 /** 234 Text value to display as tooltip. 235 236 */ 237 public java.lang.String getTip() { 238 if (tip != null) { 239 return tip; 240 } 241 ValueExpression ve = getValueExpression("tip"); 242 if (ve != null) { 243 try { 244 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 245 } catch (ELException e) { 246 throw new FacesException(e); 247 } 248 } 249 return null; 250 } 251 252 public void setTip(java.lang.String tip) { 253 this.tip = tip; 254 } 255 256 /** 257 This value will usually be set by the layout manager. 258 259 */ 260 public org.apache.myfaces.tobago.layout.Measure getHeight() { 261 if (height != null) { 262 return height; 263 } 264 ValueExpression ve = getValueExpression("height"); 265 if (ve != null) { 266 try { 267 Object object = ve.getValue(getFacesContext().getELContext()); 268 return Measure.valueOf(object); 269 } catch (ELException e) { 270 throw new FacesException(e); 271 } 272 } 273 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 274 } 275 276 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 277 this.height = height; 278 } 279 280 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 281 if (minimumWidth != null) { 282 return minimumWidth; 283 } 284 ValueExpression ve = getValueExpression("minimumWidth"); 285 if (ve != null) { 286 try { 287 Object object = ve.getValue(getFacesContext().getELContext()); 288 return Measure.valueOf(object); 289 } catch (ELException e) { 290 throw new FacesException(e); 291 } 292 } 293 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 294 } 295 296 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 297 this.minimumWidth = minimumWidth; 298 } 299 300 /** 301 Flag indicating this component should rendered as an inline element. 302 <br />Default: <code>false</code> 303 */ 304 public boolean isInline() { 305 if (inline != null) { 306 return inline; 307 } 308 ValueExpression ve = getValueExpression("inline"); 309 if (ve != null) { 310 try { 311 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 312 if (bool != null) { 313 return bool; 314 } 315 } catch (ELException e) { 316 throw new FacesException(e); 317 } 318 } 319 return false; 320 } 321 322 public void setInline(boolean inline) { 323 this.inline = inline; 324 } 325 326 public java.lang.Integer getRowSpan() { 327 if (rowSpan != null) { 328 return rowSpan; 329 } 330 ValueExpression ve = getValueExpression("rowSpan"); 331 if (ve != null) { 332 try { 333 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 334 if (number != null) { 335 return number.intValue(); 336 } 337 } catch (ELException e) { 338 throw new FacesException(e); 339 } 340 } 341 return 1; 342 } 343 344 public void setRowSpan(java.lang.Integer rowSpan) { 345 this.rowSpan = rowSpan; 346 } 347 348 /** 349 Flag indicating this component should receive the focus. 350 <br />Default: <code>false</code> 351 */ 352 public boolean isFocus() { 353 if (focus != null) { 354 return focus; 355 } 356 ValueExpression ve = getValueExpression("focus"); 357 if (ve != null) { 358 try { 359 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 360 if (bool != null) { 361 return bool; 362 } 363 } catch (ELException e) { 364 throw new FacesException(e); 365 } 366 } 367 return false; 368 } 369 370 public void setFocus(boolean focus) { 371 this.focus = focus; 372 } 373 374 /** 375 This value will usually be set by the layout manager. 376 377 */ 378 public org.apache.myfaces.tobago.layout.Measure getLeft() { 379 if (left != null) { 380 return left; 381 } 382 ValueExpression ve = getValueExpression("left"); 383 if (ve != null) { 384 try { 385 Object object = ve.getValue(getFacesContext().getELContext()); 386 return Measure.valueOf(object); 387 } catch (ELException e) { 388 throw new FacesException(e); 389 } 390 } 391 return null; 392 } 393 394 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 395 this.left = left; 396 } 397 398 public java.lang.Integer getColumnSpan() { 399 if (columnSpan != null) { 400 return columnSpan; 401 } 402 ValueExpression ve = getValueExpression("columnSpan"); 403 if (ve != null) { 404 try { 405 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 406 if (number != null) { 407 return number.intValue(); 408 } 409 } catch (ELException e) { 410 throw new FacesException(e); 411 } 412 } 413 return 1; 414 } 415 416 public void setColumnSpan(java.lang.Integer columnSpan) { 417 this.columnSpan = columnSpan; 418 } 419 420 /** 421 Flag indicating that a value is required. 422 If the value is an empty string a 423 ValidationError occurs and a Error Message is rendered. 424 <br />Default: <code>false</code> 425 */ 426 public boolean isRequired() { 427 if (required != null) { 428 return required; 429 } 430 ValueExpression ve = getValueExpression("required"); 431 if (ve != null) { 432 try { 433 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 434 if (bool != null) { 435 return bool; 436 } 437 } catch (ELException e) { 438 throw new FacesException(e); 439 } 440 } 441 return false; 442 } 443 444 public void setRequired(boolean required) { 445 this.required = required; 446 } 447 448 /** 449 This value will usually be set by the layout manager. 450 451 */ 452 public org.apache.myfaces.tobago.layout.Measure getTop() { 453 if (top != null) { 454 return top; 455 } 456 ValueExpression ve = getValueExpression("top"); 457 if (ve != null) { 458 try { 459 Object object = ve.getValue(getFacesContext().getELContext()); 460 return Measure.valueOf(object); 461 } catch (ELException e) { 462 throw new FacesException(e); 463 } 464 } 465 return null; 466 } 467 468 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 469 this.top = top; 470 } 471 472 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 473 if (maximumHeight != null) { 474 return maximumHeight; 475 } 476 ValueExpression ve = getValueExpression("maximumHeight"); 477 if (ve != null) { 478 try { 479 Object object = ve.getValue(getFacesContext().getELContext()); 480 return Measure.valueOf(object); 481 } catch (ELException e) { 482 throw new FacesException(e); 483 } 484 } 485 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 486 } 487 488 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 489 this.maximumHeight = maximumHeight; 490 } 491 492 /** 493 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 494 495 */ 496 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 497 if (currentWidth != null) { 498 return currentWidth; 499 } 500 ValueExpression ve = getValueExpression("currentWidth"); 501 if (ve != null) { 502 try { 503 Object object = ve.getValue(getFacesContext().getELContext()); 504 return Measure.valueOf(object); 505 } catch (ELException e) { 506 throw new FacesException(e); 507 } 508 } 509 return getWidth(); 510 } 511 512 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 513 this.currentWidth = currentWidth; 514 } 515 516 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 517 if (marginTop != null) { 518 return marginTop; 519 } 520 ValueExpression ve = getValueExpression("marginTop"); 521 if (ve != null) { 522 try { 523 Object object = ve.getValue(getFacesContext().getELContext()); 524 return Measure.valueOf(object); 525 } catch (ELException e) { 526 throw new FacesException(e); 527 } 528 } 529 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 530 } 531 532 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 533 this.marginTop = marginTop; 534 } 535 536 /** 537 This value will usually be set by the layout manager. 538 539 */ 540 public org.apache.myfaces.tobago.layout.Measure getWidth() { 541 if (width != null) { 542 return width; 543 } 544 ValueExpression ve = getValueExpression("width"); 545 if (ve != null) { 546 try { 547 Object object = ve.getValue(getFacesContext().getELContext()); 548 return Measure.valueOf(object); 549 } catch (ELException e) { 550 throw new FacesException(e); 551 } 552 } 553 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 554 } 555 556 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 557 this.width = width; 558 } 559 560 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 561 if (marginRight != null) { 562 return marginRight; 563 } 564 ValueExpression ve = getValueExpression("marginRight"); 565 if (ve != null) { 566 try { 567 Object object = ve.getValue(getFacesContext().getELContext()); 568 return Measure.valueOf(object); 569 } catch (ELException e) { 570 throw new FacesException(e); 571 } 572 } 573 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 574 } 575 576 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 577 this.marginRight = marginRight; 578 } 579 580 /** 581 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 582 583 */ 584 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 585 if (currentHeight != null) { 586 return currentHeight; 587 } 588 ValueExpression ve = getValueExpression("currentHeight"); 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 getHeight(); 598 } 599 600 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 601 this.currentHeight = currentHeight; 602 } 603 604 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 605 if (preferredHeight != null) { 606 return preferredHeight; 607 } 608 ValueExpression ve = getValueExpression("preferredHeight"); 609 if (ve != null) { 610 try { 611 Object object = ve.getValue(getFacesContext().getELContext()); 612 return Measure.valueOf(object); 613 } catch (ELException e) { 614 throw new FacesException(e); 615 } 616 } 617 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 618 } 619 620 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 621 this.preferredHeight = preferredHeight; 622 } 623 624 /** 625 Text value to display as label. 626 If text contains an underscore the next character is used as accesskey. 627 628 */ 629 public java.lang.String getLabel() { 630 if (label != null) { 631 return label; 632 } 633 ValueExpression ve = getValueExpression("label"); 634 if (ve != null) { 635 try { 636 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 637 } catch (ELException e) { 638 throw new FacesException(e); 639 } 640 } 641 return null; 642 } 643 644 public void setLabel(java.lang.String label) { 645 this.label = label; 646 } 647 648 /** 649 This attribute is for internal use only. 650 651 */ 652 public org.apache.myfaces.tobago.layout.Display getDisplay() { 653 if (display != null) { 654 return display; 655 } 656 ValueExpression ve = getValueExpression("display"); 657 if (ve != null) { 658 try { 659 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 660 } catch (ELException e) { 661 throw new FacesException(e); 662 } 663 } 664 return null; 665 } 666 667 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 668 this.display = display; 669 } 670 671 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 672 if (maximumWidth != null) { 673 return maximumWidth; 674 } 675 ValueExpression ve = getValueExpression("maximumWidth"); 676 if (ve != null) { 677 try { 678 Object object = ve.getValue(getFacesContext().getELContext()); 679 return Measure.valueOf(object); 680 } catch (ELException e) { 681 throw new FacesException(e); 682 } 683 } 684 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 685 } 686 687 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 688 this.maximumWidth = maximumWidth; 689 } 690 691 /** 692 Clientside script function to add to this component's onchange handler. 693 694 */ 695 public java.lang.String getOnchange() { 696 if (onchange != null) { 697 return onchange; 698 } 699 ValueExpression ve = getValueExpression("onchange"); 700 if (ve != null) { 701 try { 702 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 703 } catch (ELException e) { 704 throw new FacesException(e); 705 } 706 } 707 return null; 708 } 709 710 public void setOnchange(java.lang.String onchange) { 711 this.onchange = onchange; 712 } 713 714 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 715 if (preferredWidth != null) { 716 return preferredWidth; 717 } 718 ValueExpression ve = getValueExpression("preferredWidth"); 719 if (ve != null) { 720 try { 721 Object object = ve.getValue(getFacesContext().getELContext()); 722 return Measure.valueOf(object); 723 } catch (ELException e) { 724 throw new FacesException(e); 725 } 726 } 727 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 728 } 729 730 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 731 this.preferredWidth = preferredWidth; 732 } 733 734 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 735 if (marginBottom != null) { 736 return marginBottom; 737 } 738 ValueExpression ve = getValueExpression("marginBottom"); 739 if (ve != null) { 740 try { 741 Object object = ve.getValue(getFacesContext().getELContext()); 742 return Measure.valueOf(object); 743 } catch (ELException e) { 744 throw new FacesException(e); 745 } 746 } 747 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 748 } 749 750 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 751 this.marginBottom = marginBottom; 752 } 753 754 /** 755 This attribute is for internal use only. 756 757 */ 758 public java.lang.Integer getVerticalIndex() { 759 if (verticalIndex != null) { 760 return verticalIndex; 761 } 762 ValueExpression ve = getValueExpression("verticalIndex"); 763 if (ve != null) { 764 try { 765 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 766 if (number != null) { 767 return number.intValue(); 768 } 769 } catch (ELException e) { 770 throw new FacesException(e); 771 } 772 } 773 return null; 774 } 775 776 public void setVerticalIndex(java.lang.Integer verticalIndex) { 777 this.verticalIndex = verticalIndex; 778 } 779 780 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 781 if (currentMarkup != null) { 782 return currentMarkup; 783 } 784 return null; 785 } 786 787 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 788 this.currentMarkup = currentMarkup; 789 } 790 791 /** 792 This attribute is for internal use only. 793 794 */ 795 public java.lang.Integer getHorizontalIndex() { 796 if (horizontalIndex != null) { 797 return horizontalIndex; 798 } 799 ValueExpression ve = getValueExpression("horizontalIndex"); 800 if (ve != null) { 801 try { 802 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 803 if (number != null) { 804 return number.intValue(); 805 } 806 } catch (ELException e) { 807 throw new FacesException(e); 808 } 809 } 810 return null; 811 } 812 813 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 814 this.horizontalIndex = horizontalIndex; 815 } 816 817 /** 818 Flag indicating that this component will prohibit changes by the user. 819 <br />Default: <code>false</code> 820 */ 821 public boolean isReadonly() { 822 if (readonly != null) { 823 return readonly; 824 } 825 ValueExpression ve = getValueExpression("readonly"); 826 if (ve != null) { 827 try { 828 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 829 if (bool != null) { 830 return bool; 831 } 832 } catch (ELException e) { 833 throw new FacesException(e); 834 } 835 } 836 return false; 837 } 838 839 public void setReadonly(boolean readonly) { 840 this.readonly = readonly; 841 } 842 843 /** 844 Flag indicating that this element is disabled. 845 <br />Default: <code>false</code> 846 */ 847 public boolean isDisabled() { 848 if (disabled != null) { 849 return disabled; 850 } 851 ValueExpression ve = getValueExpression("disabled"); 852 if (ve != null) { 853 try { 854 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 855 if (bool != null) { 856 return bool; 857 } 858 } catch (ELException e) { 859 throw new FacesException(e); 860 } 861 } 862 return false; 863 } 864 865 public void setDisabled(boolean disabled) { 866 this.disabled = disabled; 867 } 868 869 public void restoreState(FacesContext context, Object componentState) { 870 Object[] values = (Object[]) componentState; 871 super.restoreState(context, values[0]); 872 markup = (org.apache.myfaces.tobago.context.Markup) values[1]; 873 accessKey = (java.lang.Character) values[2]; 874 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[3]; 875 labelWithAccessKey = (java.lang.String) values[4]; 876 tabIndex = (java.lang.Integer) values[5]; 877 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[6]; 878 tip = (java.lang.String) values[7]; 879 height = (org.apache.myfaces.tobago.layout.Measure) values[8]; 880 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[9]; 881 inline = (java.lang.Boolean) values[10]; 882 rowSpan = (java.lang.Integer) values[11]; 883 focus = (java.lang.Boolean) values[12]; 884 left = (org.apache.myfaces.tobago.layout.Measure) values[13]; 885 columnSpan = (java.lang.Integer) values[14]; 886 required = (java.lang.Boolean) values[15]; 887 top = (org.apache.myfaces.tobago.layout.Measure) values[16]; 888 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[17]; 889 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[18]; 890 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[19]; 891 width = (org.apache.myfaces.tobago.layout.Measure) values[20]; 892 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[21]; 893 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[22]; 894 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[23]; 895 label = (java.lang.String) values[24]; 896 display = (org.apache.myfaces.tobago.layout.Display) values[25]; 897 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[26]; 898 onchange = (java.lang.String) values[27]; 899 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[28]; 900 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[29]; 901 verticalIndex = (java.lang.Integer) values[30]; 902 horizontalIndex = (java.lang.Integer) values[31]; 903 readonly = (java.lang.Boolean) values[32]; 904 disabled = (java.lang.Boolean) values[33]; 905 } 906 907 public Object saveState(FacesContext context) { 908 Object[] values = new Object[34]; 909 values[0] = super.saveState(context); 910 values[1] = markup; 911 values[2] = accessKey; 912 values[3] = marginLeft; 913 values[4] = labelWithAccessKey; 914 values[5] = tabIndex; 915 values[6] = minimumHeight; 916 values[7] = tip; 917 values[8] = height; 918 values[9] = minimumWidth; 919 values[10] = inline; 920 values[11] = rowSpan; 921 values[12] = focus; 922 values[13] = left; 923 values[14] = columnSpan; 924 values[15] = required; 925 values[16] = top; 926 values[17] = maximumHeight; 927 values[18] = currentWidth; 928 values[19] = marginTop; 929 values[20] = width; 930 values[21] = marginRight; 931 values[22] = currentHeight; 932 values[23] = preferredHeight; 933 values[24] = label; 934 values[25] = display; 935 values[26] = maximumWidth; 936 values[27] = onchange; 937 values[28] = preferredWidth; 938 values[29] = marginBottom; 939 values[30] = verticalIndex; 940 values[31] = horizontalIndex; 941 values[32] = readonly; 942 values[33] = disabled; 943 currentMarkup = null; 944 return values; 945 } 946 947 948 }