1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.TextTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELTextTag extends TextTag { 37 38 42 private String accesskeyExpr; 43 47 private String altExpr; 48 52 private String altKeyExpr; 53 57 private String bundleExpr; 58 62 private String disabledExpr; 63 67 private String errorKeyExpr; 68 72 private String errorStyleExpr; 73 77 private String errorStyleClassExpr; 78 82 private String errorStyleIdExpr; 83 87 private String indexedExpr; 88 92 private String maxlengthExpr; 93 97 private String nameExpr; 98 102 private String onblurExpr; 103 107 private String onchangeExpr; 108 112 private String onclickExpr; 113 117 private String ondblclickExpr; 118 122 private String onfocusExpr; 123 127 private String onkeydownExpr; 128 132 private String onkeypressExpr; 133 137 private String onkeyupExpr; 138 142 private String onmousedownExpr; 143 147 private String onmousemoveExpr; 148 152 private String onmouseoutExpr; 153 157 private String onmouseoverExpr; 158 162 private String onmouseupExpr; 163 167 private String propertyExpr; 168 172 private String readonlyExpr; 173 177 private String styleExpr; 178 182 private String sizeExpr; 183 187 private String styleClassExpr; 188 192 private String styleIdExpr; 193 197 private String tabindexExpr; 198 202 private String titleExpr; 203 207 private String titleKeyExpr; 208 212 private String valueExpr; 213 214 218 public String getAccesskeyExpr() { return (accesskeyExpr); } 219 223 public String getAltExpr() { return (altExpr); } 224 228 public String getAltKeyExpr() { return (altKeyExpr); } 229 233 public String getBundleExpr() { return (bundleExpr); } 234 238 public String getDisabledExpr() { return (disabledExpr); } 239 243 public String getErrorKeyExpr() { return (errorKeyExpr); } 244 248 public String getErrorStyleExpr() { return (errorStyleExpr); } 249 253 public String getErrorStyleClassExpr() { return (errorStyleClassExpr); } 254 258 public String getErrorStyleIdExpr() { return (errorStyleIdExpr); } 259 263 public String getIndexedExpr() { return (indexedExpr); } 264 268 public String getMaxlengthExpr() { return (maxlengthExpr); } 269 273 public String getNameExpr() { return (nameExpr); } 274 278 public String getOnblurExpr() { return (onblurExpr); } 279 283 public String getOnchangeExpr() { return (onchangeExpr); } 284 288 public String getOnclickExpr() { return (onclickExpr); } 289 293 public String getOndblclickExpr() { return (ondblclickExpr); } 294 298 public String getOnfocusExpr() { return (onfocusExpr); } 299 303 public String getOnkeydownExpr() { return (onkeydownExpr); } 304 308 public String getOnkeypressExpr() { return (onkeypressExpr); } 309 313 public String getOnkeyupExpr() { return (onkeyupExpr); } 314 318 public String getOnmousedownExpr() { return (onmousedownExpr); } 319 323 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 324 328 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 329 333 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 334 338 public String getOnmouseupExpr() { return (onmouseupExpr); } 339 343 public String getPropertyExpr() { return (propertyExpr); } 344 348 public String getReadonlyExpr() { return (readonlyExpr); } 349 353 public String getStyleExpr() { return (styleExpr); } 354 358 public String getSizeExpr() { return (sizeExpr); } 359 363 public String getStyleClassExpr() { return (styleClassExpr); } 364 368 public String getStyleIdExpr() { return (styleIdExpr); } 369 373 public String getTabindexExpr() { return (tabindexExpr); } 374 378 public String getTitleExpr() { return (titleExpr); } 379 383 public String getTitleKeyExpr() { return (titleKeyExpr); } 384 388 public String getValueExpr() { return (valueExpr); } 389 390 394 public void setAccesskeyExpr(String accesskeyExpr) { this.accesskeyExpr = accesskeyExpr; } 395 399 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 400 404 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 405 409 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 410 414 public void setDisabledExpr(String disabledExpr) { this.disabledExpr = disabledExpr; } 415 419 public void setErrorKeyExpr(String errorKeyExpr) { this.errorKeyExpr = errorKeyExpr; } 420 424 public void setErrorStyleExpr(String errorStyleExpr) { this.errorStyleExpr = errorStyleExpr; } 425 429 public void setErrorStyleClassExpr(String errorStyleClassExpr) { this.errorStyleClassExpr = errorStyleClassExpr; } 430 434 public void setErrorStyleIdExpr(String errorStyleIdExpr) { this.errorStyleIdExpr = errorStyleIdExpr; } 435 439 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 440 444 public void setMaxlengthExpr(String maxlengthExpr) { this.maxlengthExpr = maxlengthExpr; } 445 449 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 450 454 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 455 459 public void setOnchangeExpr(String onchangeExpr) { this.onchangeExpr = onchangeExpr; } 460 464 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 465 469 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 470 474 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 475 479 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 480 484 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 485 489 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 490 494 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 495 499 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 500 504 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 505 509 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 510 514 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 515 519 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 520 524 public void setReadonlyExpr(String readonlyExpr) { this.readonlyExpr = readonlyExpr; } 525 529 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 530 534 public void setSizeExpr(String sizeExpr) { this.sizeExpr = sizeExpr; } 535 539 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 540 544 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 545 549 public void setTabindexExpr(String tabindexExpr) { this.tabindexExpr = tabindexExpr; } 550 554 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 555 559 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 560 564 public void setValueExpr(String valueExpr) { this.valueExpr = valueExpr; } 565 566 569 public void release() 570 { 571 super.release(); 572 setAccesskeyExpr(null); 573 setAltExpr(null); 574 setAltKeyExpr(null); 575 setBundleExpr(null); 576 setDisabledExpr(null); 577 setErrorKey(null); 578 setErrorStyleExpr(null); 579 setErrorStyleClassExpr(null); 580 setErrorStyleIdExpr(null); 581 setIndexedExpr(null); 582 setMaxlengthExpr(null); 583 setNameExpr(null); 584 setOnblurExpr(null); 585 setOnchangeExpr(null); 586 setOnclickExpr(null); 587 setOndblclickExpr(null); 588 setOnfocusExpr(null); 589 setOnkeydownExpr(null); 590 setOnkeypressExpr(null); 591 setOnkeyupExpr(null); 592 setOnmousedownExpr(null); 593 setOnmousemoveExpr(null); 594 setOnmouseoutExpr(null); 595 setOnmouseoverExpr(null); 596 setOnmouseupExpr(null); 597 setPropertyExpr(null); 598 setReadonlyExpr(null); 599 setStyleExpr(null); 600 setSizeExpr(null); 601 setStyleClassExpr(null); 602 setStyleIdExpr(null); 603 setTabindexExpr(null); 604 setTitleExpr(null); 605 setTitleKeyExpr(null); 606 setValueExpr(null); 607 } 608 609 614 public int doStartTag() throws JspException { 615 evaluateExpressions(); 616 return(super.doStartTag()); 617 } 618 619 625 private void evaluateExpressions() throws JspException { 626 String string = null; 627 Boolean bool = null; 628 629 if ((string = EvalHelper.evalString("accesskey", getAccesskeyExpr(), 630 this, pageContext)) != null) 631 setAccesskey(string); 632 633 if ((string = EvalHelper.evalString("alt", getAltExpr(), 634 this, pageContext)) != null) 635 setAlt(string); 636 637 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 638 this, pageContext)) != null) 639 setAltKey(string); 640 641 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 642 this, pageContext)) != null) 643 setBundle(string); 644 645 if ((bool = EvalHelper.evalBoolean("disabled", getDisabledExpr(), 646 this, pageContext)) != null) 647 setDisabled(bool.booleanValue()); 648 649 if ((string = EvalHelper.evalString("errorKey", getErrorKeyExpr(), 650 this, pageContext)) != null) 651 setErrorKey(string); 652 653 if ((string = EvalHelper.evalString("errorStyle", getErrorStyleExpr(), 654 this, pageContext)) != null) 655 setErrorStyle(string); 656 657 if ((string = EvalHelper.evalString("errorStyleClass", getErrorStyleClassExpr(), 658 this, pageContext)) != null) 659 setErrorStyleClass(string); 660 661 if ((string = EvalHelper.evalString("errorStyleId", getErrorStyleIdExpr(), 662 this, pageContext)) != null) 663 setErrorStyleId(string); 664 665 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 666 this, pageContext)) != null) 667 setIndexed(bool.booleanValue()); 668 669 if ((string = EvalHelper.evalString("maxlength", getMaxlengthExpr(), 670 this, pageContext)) != null) 671 setMaxlength(string); 672 673 if ((string = EvalHelper.evalString("name", getNameExpr(), 674 this, pageContext)) != null) 675 setName(string); 676 677 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 678 this, pageContext)) != null) 679 setOnblur(string); 680 681 if ((string = EvalHelper.evalString("onchange", getOnchangeExpr(), 682 this, pageContext)) != null) 683 setOnchange(string); 684 685 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 686 this, pageContext)) != null) 687 setOnclick(string); 688 689 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 690 this, pageContext)) != null) 691 setOndblclick(string); 692 693 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 694 this, pageContext)) != null) 695 setOnfocus(string); 696 697 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 698 this, pageContext)) != null) 699 setOnkeydown(string); 700 701 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 702 this, pageContext)) != null) 703 setOnkeypress(string); 704 705 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 706 this, pageContext)) != null) 707 setOnkeyup(string); 708 709 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 710 this, pageContext)) != null) 711 setOnmousedown(string); 712 713 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 714 this, pageContext)) != null) 715 setOnmousemove(string); 716 717 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 718 this, pageContext)) != null) 719 setOnmouseout(string); 720 721 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 722 this, pageContext)) != null) 723 setOnmouseover(string); 724 725 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 726 this, pageContext)) != null) 727 setOnmouseup(string); 728 729 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 730 this, pageContext)) != null) 731 setProperty(string); 732 733 if ((bool = EvalHelper.evalBoolean("readonly", getReadonlyExpr(), 734 this, pageContext)) != null) 735 setReadonly(bool.booleanValue()); 736 737 if ((string = EvalHelper.evalString("style", getStyleExpr(), 738 this, pageContext)) != null) 739 setStyle(string); 740 741 if ((string = EvalHelper.evalString("size", getSizeExpr(), 742 this, pageContext)) != null) 743 setSize(string); 744 745 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 746 this, pageContext)) != null) 747 setStyleClass(string); 748 749 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 750 this, pageContext)) != null) 751 setStyleId(string); 752 753 if ((string = EvalHelper.evalString("tabindex", getTabindexExpr(), 754 this, pageContext)) != null) 755 setTabindex(string); 756 757 if ((string = EvalHelper.evalString("title", getTitleExpr(), 758 this, pageContext)) != null) 759 setTitle(string); 760 761 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 762 this, pageContext)) != null) 763 setTitleKey(string); 764 765 if ((string = EvalHelper.evalString("value", getValueExpr(), 766 this, pageContext)) != null) 767 setValue(string); 768 } 769 } 770 | Popular Tags |