1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.LinkTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELLinkTag extends LinkTag { 37 38 42 private String accessKeyExpr; 43 47 private String actionExpr; 48 52 private String moduleExpr; 53 57 private String anchorExpr; 58 62 private String bundleExpr; 63 67 private String forwardExpr; 68 72 private String hrefExpr; 73 77 private String indexedExpr; 78 82 private String indexIdExpr; 83 87 private String linkNameExpr; 88 92 private String nameExpr; 93 97 private String onblurExpr; 98 102 private String onclickExpr; 103 107 private String ondblclickExpr; 108 112 private String onfocusExpr; 113 117 private String onkeydownExpr; 118 122 private String onkeypressExpr; 123 127 private String onkeyupExpr; 128 132 private String onmousedownExpr; 133 137 private String onmousemoveExpr; 138 142 private String onmouseoutExpr; 143 147 private String onmouseoverExpr; 148 152 private String onmouseupExpr; 153 157 private String pageExpr; 158 162 private String paramIdExpr; 163 167 private String paramNameExpr; 168 172 private String paramPropertyExpr; 173 177 private String paramScopeExpr; 178 182 private String propertyExpr; 183 187 private String scopeExpr; 188 192 private String styleExpr; 193 197 private String styleClassExpr; 198 202 private String styleIdExpr; 203 207 private String tabindexExpr; 208 212 private String targetExpr; 213 217 private String titleExpr; 218 222 private String titleKeyExpr; 223 227 private String transactionExpr; 228 232 private String useLocalEncodingExpr; 233 234 238 public String getAccesskeyExpr() { return (accessKeyExpr); } 239 243 public String getActionExpr() { return (actionExpr); } 244 248 public String getModuleExpr() { return (moduleExpr); } 249 253 public String getAnchorExpr() { return (anchorExpr); } 254 258 public String getBundleExpr() { return (bundleExpr); } 259 263 public String getForwardExpr() { return (forwardExpr); } 264 268 public String getHrefExpr() { return (hrefExpr); } 269 273 public String getIndexedExpr() { return (indexedExpr); } 274 278 public String getIndexIdExpr() { return (indexIdExpr); } 279 283 public String getLinkNameExpr() { return (linkNameExpr); } 284 288 public String getNameExpr() { return (nameExpr); } 289 293 public String getOnblurExpr() { return (onblurExpr); } 294 298 public String getOnclickExpr() { return (onclickExpr); } 299 303 public String getOndblclickExpr() { return (ondblclickExpr); } 304 308 public String getOnfocusExpr() { return (onfocusExpr); } 309 313 public String getOnkeydownExpr() { return (onkeydownExpr); } 314 318 public String getOnkeypressExpr() { return (onkeypressExpr); } 319 323 public String getOnkeyupExpr() { return (onkeyupExpr); } 324 328 public String getOnmousedownExpr() { return (onmousedownExpr); } 329 333 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 334 338 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 339 343 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 344 348 public String getOnmouseupExpr() { return (onmouseupExpr); } 349 353 public String getPageExpr() { return (pageExpr); } 354 358 public String getParamIdExpr() { return (paramIdExpr); } 359 363 public String getParamNameExpr() { return (paramNameExpr); } 364 368 public String getParamPropertyExpr() { return (paramPropertyExpr); } 369 373 public String getParamScopeExpr() { return (paramScopeExpr); } 374 378 public String getPropertyExpr() { return (propertyExpr); } 379 383 public String getScopeExpr() { return (scopeExpr); } 384 388 public String getStyleExpr() { return (styleExpr); } 389 393 public String getStyleClassExpr() { return (styleClassExpr); } 394 398 public String getStyleIdExpr() { return (styleIdExpr); } 399 403 public String getTabindexExpr() { return (tabindexExpr); } 404 408 public String getTargetExpr() { return (targetExpr); } 409 413 public String getTitleExpr() { return (titleExpr); } 414 418 public String getTitleKeyExpr() { return (titleKeyExpr); } 419 423 public String getTransactionExpr() { return (transactionExpr); } 424 428 public String getUseLocalEncodingExpr() { return (useLocalEncodingExpr); } 429 430 434 public void setAccesskeyExpr(String accessKeyExpr) { this.accessKeyExpr = accessKeyExpr; } 435 439 public void setActionExpr(String actionExpr) { this.actionExpr = actionExpr; } 440 444 public void setModuleExpr(String moduleExpr) { this.moduleExpr = moduleExpr; } 445 449 public void setAnchorExpr(String anchorExpr) { this.anchorExpr = anchorExpr; } 450 454 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 455 459 public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; } 460 464 public void setHrefExpr(String hrefExpr) { this.hrefExpr = hrefExpr; } 465 469 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 470 474 public void setIndexIdExpr(String indexIdExpr) { this.indexIdExpr = indexIdExpr; } 475 479 public void setLinkNameExpr(String linkNameExpr) { this.linkNameExpr = linkNameExpr; } 480 484 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 485 489 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 490 494 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 495 499 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 500 504 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 505 509 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 510 514 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 515 519 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 520 524 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 525 529 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 530 534 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 535 539 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 540 544 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 545 549 public void setPageExpr(String pageExpr) { this.pageExpr = pageExpr; } 550 554 public void setParamIdExpr(String paramIdExpr) { this.paramIdExpr = paramIdExpr; } 555 559 public void setParamNameExpr(String paramNameExpr) { this.paramNameExpr = paramNameExpr; } 560 564 public void setParamPropertyExpr(String paramPropertyExpr) { this.paramPropertyExpr = paramPropertyExpr; } 565 569 public void setParamScopeExpr(String paramScopeExpr) { this.paramScopeExpr = paramScopeExpr; } 570 574 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 575 579 public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; } 580 584 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 585 589 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 590 594 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 595 599 public void setTabindexExpr(String tabindexExpr) { this.tabindexExpr = tabindexExpr; } 600 604 public void setTargetExpr(String targetExpr) { this.targetExpr = targetExpr; } 605 609 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 610 614 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 615 619 public void setTransactionExpr(String transactionExpr) { this.transactionExpr = transactionExpr; } 620 624 public void setUseLocalEncodingExpr(String useLocalEncodingExpr) { this.useLocalEncodingExpr = useLocalEncodingExpr; } 625 626 629 public void release() 630 { 631 super.release(); 632 setAccesskeyExpr(null); 633 setActionExpr(null); 634 setModuleExpr(null); 635 setAnchorExpr(null); 636 setBundleExpr(null); 637 setForwardExpr(null); 638 setHrefExpr(null); 639 setIndexedExpr(null); 640 setIndexIdExpr(null); 641 setLinkNameExpr(null); 642 setNameExpr(null); 643 setOnblurExpr(null); 644 setOnclickExpr(null); 645 setOndblclickExpr(null); 646 setOnfocusExpr(null); 647 setOnkeydownExpr(null); 648 setOnkeypressExpr(null); 649 setOnkeyupExpr(null); 650 setOnmousedownExpr(null); 651 setOnmousemoveExpr(null); 652 setOnmouseoutExpr(null); 653 setOnmouseoverExpr(null); 654 setOnmouseupExpr(null); 655 setPageExpr(null); 656 setParamIdExpr(null); 657 setParamNameExpr(null); 658 setParamPropertyExpr(null); 659 setParamScopeExpr(null); 660 setPropertyExpr(null); 661 setScopeExpr(null); 662 setStyleExpr(null); 663 setStyleClassExpr(null); 664 setStyleIdExpr(null); 665 setTabindexExpr(null); 666 setTargetExpr(null); 667 setTitleExpr(null); 668 setTitleKeyExpr(null); 669 setTransactionExpr(null); 670 setUseLocalEncodingExpr(null); 671 } 672 673 678 public int doStartTag() throws JspException { 679 evaluateExpressions(); 680 return (super.doStartTag()); 681 } 682 683 689 private void evaluateExpressions() throws JspException { 690 String string = null; 691 Boolean bool = null; 692 693 if ((string = EvalHelper.evalString("accessKey", getAccesskeyExpr(), 694 this, pageContext)) != null) 695 setAccesskey(string); 696 697 if ((string = EvalHelper.evalString("action", getActionExpr(), 698 this, pageContext)) != null) 699 setAction(string); 700 701 if ((string = EvalHelper.evalString("module", getModuleExpr(), 702 this, pageContext)) != null) 703 setModule(string); 704 705 if ((string = EvalHelper.evalString("anchor", getAnchorExpr(), 706 this, pageContext)) != null) 707 setAnchor(string); 708 709 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 710 this, pageContext)) != null) 711 setBundle(string); 712 713 if ((string = EvalHelper.evalString("forward", getForwardExpr(), 714 this, pageContext)) != null) 715 setForward(string); 716 717 if ((string = EvalHelper.evalString("href", getHrefExpr(), 718 this, pageContext)) != null) 719 setHref(string); 720 721 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 722 this, pageContext)) != null) 723 setIndexed(bool.booleanValue()); 724 725 if ((string = EvalHelper.evalString("indexId", getIndexIdExpr(), 726 this, pageContext)) != null) 727 setIndexId(string); 728 729 if ((string = EvalHelper.evalString("linkName", getLinkNameExpr(), 730 this, pageContext)) != null) 731 setLinkName(string); 732 733 if ((string = EvalHelper.evalString("name", getNameExpr(), 734 this, pageContext)) != null) 735 setName(string); 736 737 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 738 this, pageContext)) != null) 739 setOnblur(string); 740 741 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 742 this, pageContext)) != null) 743 setOnclick(string); 744 745 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 746 this, pageContext)) != null) 747 setOndblclick(string); 748 749 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 750 this, pageContext)) != null) 751 setOnfocus(string); 752 753 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 754 this, pageContext)) != null) 755 setOnkeydown(string); 756 757 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 758 this, pageContext)) != null) 759 setOnkeypress(string); 760 761 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 762 this, pageContext)) != null) 763 setOnkeyup(string); 764 765 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 766 this, pageContext)) != null) 767 setOnmousedown(string); 768 769 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 770 this, pageContext)) != null) 771 setOnmousemove(string); 772 773 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 774 this, pageContext)) != null) 775 setOnmouseout(string); 776 777 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 778 this, pageContext)) != null) 779 setOnmouseover(string); 780 781 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 782 this, pageContext)) != null) 783 setOnmouseup(string); 784 785 if ((string = EvalHelper.evalString("page", getPageExpr(), 786 this, pageContext)) != null) 787 setPage(string); 788 789 if ((string = EvalHelper.evalString("paramId", getParamIdExpr(), 790 this, pageContext)) != null) 791 setParamId(string); 792 793 if ((string = EvalHelper.evalString("paramName", getParamNameExpr(), 794 this, pageContext)) != null) 795 setParamName(string); 796 797 if ((string = EvalHelper.evalString("paramProperty", getParamPropertyExpr(), 798 this, pageContext)) != null) 799 setParamProperty(string); 800 801 if ((string = EvalHelper.evalString("paramScope", getParamScopeExpr(), 802 this, pageContext)) != null) 803 setParamScope(string); 804 805 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 806 this, pageContext)) != null) 807 setProperty(string); 808 809 if ((string = EvalHelper.evalString("scope", getScopeExpr(), 810 this, pageContext)) != null) 811 setScope(string); 812 813 if ((string = EvalHelper.evalString("style", getStyleExpr(), 814 this, pageContext)) != null) 815 setStyle(string); 816 817 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 818 this, pageContext)) != null) 819 setStyleClass(string); 820 821 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 822 this, pageContext)) != null) 823 setStyleId(string); 824 825 if ((string = EvalHelper.evalString("tabindex", getTabindexExpr(), 826 this, pageContext)) != null) 827 setTabindex(string); 828 829 if ((string = EvalHelper.evalString("target", getTargetExpr(), 830 this, pageContext)) != null) 831 setTarget(string); 832 833 if ((string = EvalHelper.evalString("title", getTitleExpr(), 834 this, pageContext)) != null) 835 setTitle(string); 836 837 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 838 this, pageContext)) != null) 839 setTitleKey(string); 840 841 if ((bool = EvalHelper.evalBoolean("transaction", getTransactionExpr(), 842 this, pageContext)) != null) 843 setTransaction(bool.booleanValue()); 844 845 if ((bool = EvalHelper.evalBoolean("useLocalEncoding", getUseLocalEncodingExpr(), 846 this, pageContext)) != null) 847 setUseLocalEncoding(bool.booleanValue()); 848 } 849 } 850 | Popular Tags |