1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.SelectTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 38 public class ELSelectTag extends SelectTag { 39 40 44 private String altExpr; 45 49 private String altKeyExpr; 50 54 private String bundleExpr; 55 59 private String disabledExpr; 60 64 private String errorKeyExpr; 65 69 private String errorStyleExpr; 70 74 private String errorStyleClassExpr; 75 79 private String errorStyleIdExpr; 80 84 private String indexedExpr; 85 89 private String multipleExpr; 90 94 private String nameExpr; 95 99 private String onblurExpr; 100 104 private String onchangeExpr; 105 109 private String onclickExpr; 110 114 private String ondblclickExpr; 115 119 private String onfocusExpr; 120 124 private String onkeydownExpr; 125 129 private String onkeypressExpr; 130 134 private String onkeyupExpr; 135 139 private String onmousedownExpr; 140 144 private String onmousemoveExpr; 145 149 private String onmouseoutExpr; 150 154 private String onmouseoverExpr; 155 159 private String onmouseupExpr; 160 164 private String propertyExpr; 165 169 private String sizeExpr; 170 174 private String styleExpr; 175 179 private String styleClassExpr; 180 184 private String styleIdExpr; 185 189 private String tabindexExpr; 190 194 private String titleExpr; 195 199 private String titleKeyExpr; 200 204 private String valueExpr; 205 206 210 public String getAltExpr() { return (altExpr); } 211 215 public String getAltKeyExpr() { return (altKeyExpr); } 216 220 public String getBundleExpr() { return (bundleExpr); } 221 225 public String getDisabledExpr() { return (disabledExpr); } 226 230 public String getErrorKeyExpr() { return (errorKeyExpr); } 231 235 public String getErrorStyleExpr() { return (errorStyleExpr); } 236 240 public String getErrorStyleClassExpr() { return (errorStyleClassExpr); } 241 245 public String getErrorStyleIdExpr() { return (errorStyleIdExpr); } 246 250 public String getIndexedExpr() { return (indexedExpr); } 251 255 public String getMultipleExpr() { return (multipleExpr); } 256 260 public String getNameExpr() { return (nameExpr); } 261 265 public String getOnblurExpr() { return (onblurExpr); } 266 270 public String getOnchangeExpr() { return (onchangeExpr); } 271 275 public String getOnclickExpr() { return (onclickExpr); } 276 280 public String getOndblclickExpr() { return (ondblclickExpr); } 281 285 public String getOnfocusExpr() { return (onfocusExpr); } 286 290 public String getOnkeydownExpr() { return (onkeydownExpr); } 291 295 public String getOnkeypressExpr() { return (onkeypressExpr); } 296 300 public String getOnkeyupExpr() { return (onkeyupExpr); } 301 305 public String getOnmousedownExpr() { return (onmousedownExpr); } 306 310 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 311 315 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 316 320 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 321 325 public String getOnmouseupExpr() { return (onmouseupExpr); } 326 330 public String getPropertyExpr() { return (propertyExpr); } 331 335 public String getSizeExpr() { return (sizeExpr); } 336 340 public String getStyleExpr() { return (styleExpr); } 341 345 public String getStyleClassExpr() { return (styleClassExpr); } 346 350 public String getStyleIdExpr() { return (styleIdExpr); } 351 355 public String getTabindexExpr() { return (tabindexExpr); } 356 360 public String getTitleExpr() { return (titleExpr); } 361 365 public String getTitleKeyExpr() { return (titleKeyExpr); } 366 370 public String getValueExpr() { return (valueExpr); } 371 372 376 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 377 381 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 382 386 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 387 391 public void setDisabledExpr(String disabledExpr) { this.disabledExpr = disabledExpr; } 392 396 public void setErrorKeyExpr(String errorKeyExpr) { this.errorKeyExpr = errorKeyExpr; } 397 401 public void setErrorStyleExpr(String errorStyleExpr) { this.errorStyleExpr = errorStyleExpr; } 402 406 public void setErrorStyleClassExpr(String errorStyleClassExpr) { this.errorStyleClassExpr = errorStyleClassExpr; } 407 411 public void setErrorStyleIdExpr(String errorStyleIdExpr) { this.errorStyleIdExpr = errorStyleIdExpr; } 412 416 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 417 421 public void setMultipleExpr(String multipleExpr) { this.multipleExpr = multipleExpr; } 422 426 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 427 431 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 432 436 public void setOnchangeExpr(String onchangeExpr) { this.onchangeExpr = onchangeExpr; } 437 441 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 442 446 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 447 451 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 452 456 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 457 461 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 462 466 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 467 471 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 472 476 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 477 481 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 482 486 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 487 491 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 492 496 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 497 501 public void setSizeExpr(String sizeExpr) { this.sizeExpr = sizeExpr; } 502 506 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 507 511 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 512 516 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 517 521 public void setTabindexExpr(String tabindexExpr) { this.tabindexExpr = tabindexExpr; } 522 526 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 527 531 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 532 536 public void setValueExpr(String valueExpr) { this.valueExpr = valueExpr; } 537 538 541 public void release() 542 { 543 super.release(); 544 setAltExpr(null); 545 setAltKeyExpr(null); 546 setBundleExpr(null); 547 setDisabledExpr(null); 548 setErrorKey(null); 549 setErrorStyleExpr(null); 550 setErrorStyleClassExpr(null); 551 setErrorStyleIdExpr(null); 552 setIndexedExpr(null); 553 setMultipleExpr(null); 554 setNameExpr(null); 555 setOnblurExpr(null); 556 setOnchangeExpr(null); 557 setOnclickExpr(null); 558 setOndblclickExpr(null); 559 setOnfocusExpr(null); 560 setOnkeydownExpr(null); 561 setOnkeypressExpr(null); 562 setOnkeyupExpr(null); 563 setOnmousedownExpr(null); 564 setOnmousemoveExpr(null); 565 setOnmouseoutExpr(null); 566 setOnmouseoverExpr(null); 567 setOnmouseupExpr(null); 568 setPropertyExpr(null); 569 setSizeExpr(null); 570 setStyleExpr(null); 571 setStyleClassExpr(null); 572 setStyleIdExpr(null); 573 setTabindexExpr(null); 574 setTitleExpr(null); 575 setTitleKeyExpr(null); 576 setValueExpr(null); 577 } 578 579 584 public int doStartTag() throws JspException { 585 evaluateExpressions(); 586 return(super.doStartTag()); 587 } 588 589 595 private void evaluateExpressions() throws JspException { 596 String string = null; 597 Boolean bool = null; 598 599 if ((string = EvalHelper.evalString("alt", getAltExpr(), 600 this, pageContext)) != null) 601 setAlt(string); 602 603 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 604 this, pageContext)) != null) 605 setAltKey(string); 606 607 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 608 this, pageContext)) != null) 609 setBundle(string); 610 611 if ((bool = EvalHelper.evalBoolean("disabled", getDisabledExpr(), 612 this, pageContext)) != null) 613 setDisabled(bool.booleanValue()); 614 615 if ((string = EvalHelper.evalString("errorKey", getErrorKeyExpr(), 616 this, pageContext)) != null) 617 setErrorKey(string); 618 619 if ((string = EvalHelper.evalString("errorStyle", getErrorStyleExpr(), 620 this, pageContext)) != null) 621 setErrorStyle(string); 622 623 if ((string = EvalHelper.evalString("errorStyleClass", getErrorStyleClassExpr(), 624 this, pageContext)) != null) 625 setErrorStyleClass(string); 626 627 if ((string = EvalHelper.evalString("errorStyleId", getErrorStyleIdExpr(), 628 this, pageContext)) != null) 629 setErrorStyleId(string); 630 631 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 632 this, pageContext)) != null) 633 setIndexed(bool.booleanValue()); 634 635 if ((string = EvalHelper.evalString("multiple", getMultipleExpr(), 636 this, pageContext)) != null) 637 setMultiple(string); 638 639 if ((string = EvalHelper.evalString("name", getNameExpr(), 640 this, pageContext)) != null) 641 setName(string); 642 643 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 644 this, pageContext)) != null) 645 setOnblur(string); 646 647 if ((string = EvalHelper.evalString("onchange", getOnchangeExpr(), 648 this, pageContext)) != null) 649 setOnchange(string); 650 651 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 652 this, pageContext)) != null) 653 setOnclick(string); 654 655 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 656 this, pageContext)) != null) 657 setOndblclick(string); 658 659 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 660 this, pageContext)) != null) 661 setOnfocus(string); 662 663 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 664 this, pageContext)) != null) 665 setOnkeydown(string); 666 667 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 668 this, pageContext)) != null) 669 setOnkeypress(string); 670 671 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 672 this, pageContext)) != null) 673 setOnkeyup(string); 674 675 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 676 this, pageContext)) != null) 677 setOnmousedown(string); 678 679 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 680 this, pageContext)) != null) 681 setOnmousemove(string); 682 683 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 684 this, pageContext)) != null) 685 setOnmouseout(string); 686 687 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 688 this, pageContext)) != null) 689 setOnmouseover(string); 690 691 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 692 this, pageContext)) != null) 693 setOnmouseup(string); 694 695 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 696 this, pageContext)) != null) 697 setProperty(string); 698 699 if ((string = EvalHelper.evalString("size", getSizeExpr(), 700 this, pageContext)) != null) 701 setSize(string); 702 703 if ((string = EvalHelper.evalString("style", getStyleExpr(), 704 this, pageContext)) != null) 705 setStyle(string); 706 707 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 708 this, pageContext)) != null) 709 setStyleClass(string); 710 711 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 712 this, pageContext)) != null) 713 setStyleId(string); 714 715 if ((string = EvalHelper.evalString("tabindex", getTabindexExpr(), 716 this, pageContext)) != null) 717 setTabindex(string); 718 719 if ((string = EvalHelper.evalString("title", getTitleExpr(), 720 this, pageContext)) != null) 721 setTitle(string); 722 723 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 724 this, pageContext)) != null) 725 setTitleKey(string); 726 727 if ((string = EvalHelper.evalString("value", getValueExpr(), 728 this, pageContext)) != null) 729 setValue(string); 730 } 731 } 732 | Popular Tags |