1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.ImgTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 46 public class ELImgTag extends ImgTag { 47 48 52 private String actionExpr; 53 57 private String moduleExpr; 58 62 private String alignExpr; 63 67 private String altExpr; 68 72 private String altKeyExpr; 73 77 private String borderExpr; 78 82 private String bundleExpr; 83 87 private String contextRelativeExpr; 88 92 private String heightExpr; 93 97 private String hspaceExpr; 98 102 private String imageNameExpr; 103 107 private String ismapExpr; 108 112 private String localeExpr; 113 117 private String lowsrcExpr; 118 122 private String nameExpr; 123 127 private String onclickExpr; 128 132 private String ondblclickExpr; 133 137 private String onkeydownExpr; 138 142 private String onkeypressExpr; 143 147 private String onkeyupExpr; 148 152 private String onmousedownExpr; 153 157 private String onmousemoveExpr; 158 162 private String onmouseoutExpr; 163 167 private String onmouseoverExpr; 168 172 private String onmouseupExpr; 173 177 private String paramIdExpr; 178 182 private String pageExpr; 183 187 private String pageKeyExpr; 188 192 private String paramNameExpr; 193 197 private String paramPropertyExpr; 198 202 private String paramScopeExpr; 203 207 private String propertyExpr; 208 212 private String scopeExpr; 213 217 private String srcExpr; 218 222 private String srcKeyExpr; 223 227 private String styleExpr; 228 232 private String styleClassExpr; 233 237 private String styleIdExpr; 238 242 private String titleExpr; 243 247 private String titleKeyExpr; 248 252 private String useLocalEncodingExpr; 253 257 private String usemapExpr; 258 262 private String vspaceExpr; 263 267 private String widthExpr; 268 269 273 public String getActionExpr() { return (actionExpr); } 274 278 public String getModuleExpr() { return (moduleExpr); } 279 283 public String getAlignExpr() { return (alignExpr); } 284 288 public String getAltExpr() { return (altExpr); } 289 293 public String getAltKeyExpr() { return (altKeyExpr); } 294 298 public String getBorderExpr() { return (borderExpr); } 299 303 public String getBundleExpr() { return (bundleExpr); } 304 308 public String getContextRelativeExpr() { return (contextRelativeExpr); } 309 313 public String getHeightExpr() { return (heightExpr); } 314 318 public String getHspaceExpr() { return (hspaceExpr); } 319 323 public String getImageNameExpr() { return (imageNameExpr); } 324 328 public String getIsmapExpr() { return (ismapExpr); } 329 333 public String getLocaleExpr() { return (localeExpr); } 334 338 public String getLowsrcExpr() { return (lowsrcExpr); } 339 343 public String getNameExpr() { return (nameExpr); } 344 348 public String getOnclickExpr() { return (onclickExpr); } 349 353 public String getOndblclickExpr() { return (ondblclickExpr); } 354 358 public String getOnkeydownExpr() { return (onkeydownExpr); } 359 363 public String getOnkeypressExpr() { return (onkeypressExpr); } 364 368 public String getOnkeyupExpr() { return (onkeyupExpr); } 369 373 public String getOnmousedownExpr() { return (onmousedownExpr); } 374 378 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 379 383 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 384 388 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 389 393 public String getOnmouseupExpr() { return (onmouseupExpr); } 394 398 public String getParamIdExpr() { return (paramIdExpr); } 399 403 public String getPageExpr() { return (pageExpr); } 404 408 public String getPageKeyExpr() { return (pageKeyExpr); } 409 413 public String getParamNameExpr() { return (paramNameExpr); } 414 418 public String getParamPropertyExpr() { return (paramPropertyExpr); } 419 423 public String getParamScopeExpr() { return (paramScopeExpr); } 424 428 public String getPropertyExpr() { return (propertyExpr); } 429 433 public String getScopeExpr() { return (scopeExpr); } 434 438 public String getSrcExpr() { return (srcExpr); } 439 443 public String getSrcKeyExpr() { return (srcKeyExpr); } 444 448 public String getStyleExpr() { return (styleExpr); } 449 453 public String getStyleClassExpr() { return (styleClassExpr); } 454 458 public String getStyleIdExpr() { return (styleIdExpr); } 459 463 public String getTitleExpr() { return (titleExpr); } 464 468 public String getTitleKeyExpr() { return (titleKeyExpr); } 469 473 public String getUseLocalEncodingExpr() { return (useLocalEncodingExpr); } 474 478 public String getUsemapExpr() { return (usemapExpr); } 479 483 public String getVspaceExpr() { return (vspaceExpr); } 484 488 public String getWidthExpr() { return (widthExpr); } 489 490 494 public void setActionExpr(String actionExpr) { this.actionExpr = actionExpr; } 495 499 public void setModuleExpr(String moduleExpr) { this.moduleExpr = moduleExpr; } 500 504 public void setAlignExpr(String alignExpr) { this.alignExpr = alignExpr; } 505 509 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 510 514 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 515 519 public void setBorderExpr(String borderExpr) { this.borderExpr = borderExpr; } 520 524 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 525 529 public void setContextRelativeExpr(String contextRelativeExpr) { this.contextRelativeExpr = contextRelativeExpr; } 530 534 public void setHeightExpr(String heightExpr) { this.heightExpr = heightExpr; } 535 539 public void setHspaceExpr(String hspaceExpr) { this.hspaceExpr = hspaceExpr; } 540 544 public void setImageNameExpr(String imageNameExpr) { this.imageNameExpr = imageNameExpr; } 545 549 public void setIsmapExpr(String ismapExpr) { this.ismapExpr = ismapExpr; } 550 554 public void setLocaleExpr(String localeExpr) { this.localeExpr = localeExpr; } 555 559 public void setLowsrcExpr(String lowsrcExpr) { this.lowsrcExpr = lowsrcExpr; } 560 564 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 565 569 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 570 574 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 575 579 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 580 584 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 585 589 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 590 594 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 595 599 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 600 604 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 605 609 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 610 614 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 615 619 public void setParamIdExpr(String paramIdExpr) { this.paramIdExpr = paramIdExpr; } 620 624 public void setPageExpr(String pageExpr) { this.pageExpr = pageExpr; } 625 629 public void setPageKeyExpr(String pageKeyExpr) { this.pageKeyExpr = pageKeyExpr; } 630 634 public void setParamNameExpr(String paramNameExpr) { this.paramNameExpr = paramNameExpr; } 635 639 public void setParamPropertyExpr(String paramPropertyExpr) { this.paramPropertyExpr = paramPropertyExpr; } 640 644 public void setParamScopeExpr(String paramScopeExpr) { this.paramScopeExpr = paramScopeExpr; } 645 649 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 650 654 public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; } 655 659 public void setSrcExpr(String srcExpr) { this.srcExpr = srcExpr; } 660 664 public void setSrcKeyExpr(String srcKeyExpr) { this.srcKeyExpr = srcKeyExpr; } 665 669 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 670 674 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 675 679 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 680 684 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 685 689 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 690 694 public void setUseLocalEncodingExpr(String useLocalEncodingExpr) { this.useLocalEncodingExpr = useLocalEncodingExpr; } 695 699 public void setUsemapExpr(String usemapExpr) { this.usemapExpr = usemapExpr; } 700 704 public void setVspaceExpr(String vspaceExpr) { this.vspaceExpr = vspaceExpr; } 705 709 public void setWidthExpr(String widthExpr) { this.widthExpr = widthExpr; } 710 711 714 public void release() 715 { 716 super.release(); 717 setActionExpr(null); 718 setModuleExpr(null); 719 setAlignExpr(null); 720 setAltExpr(null); 721 setAltKeyExpr(null); 722 setBorderExpr(null); 723 setBundleExpr(null); 724 setContextRelativeExpr(null); 725 setHeightExpr(null); 726 setHspaceExpr(null); 727 setImageNameExpr(null); 728 setIsmapExpr(null); 729 setLocaleExpr(null); 730 setLowsrcExpr(null); 731 setNameExpr(null); 732 setOnclickExpr(null); 733 setOndblclickExpr(null); 734 setOnkeydownExpr(null); 735 setOnkeypressExpr(null); 736 setOnkeyupExpr(null); 737 setOnmousedownExpr(null); 738 setOnmousemoveExpr(null); 739 setOnmouseoutExpr(null); 740 setOnmouseoverExpr(null); 741 setOnmouseupExpr(null); 742 setPageExpr(null); 743 setPageKeyExpr(null); 744 setParamIdExpr(null); 745 setParamNameExpr(null); 746 setParamPropertyExpr(null); 747 setParamScopeExpr(null); 748 setPropertyExpr(null); 749 setScopeExpr(null); 750 setSrcExpr(null); 751 setSrcKeyExpr(null); 752 setStyleExpr(null); 753 setStyleClassExpr(null); 754 setStyleIdExpr(null); 755 setTitleExpr(null); 756 setTitleKeyExpr(null); 757 setUseLocalEncodingExpr(null); 758 setUsemapExpr(null); 759 setVspaceExpr(null); 760 setWidthExpr(null); 761 } 762 763 768 public int doStartTag() throws JspException { 769 evaluateExpressions(); 770 return (super.doStartTag()); 771 } 772 773 779 private void evaluateExpressions() throws JspException { 780 String string = null; 781 Boolean bool = null; 782 783 if ((string = EvalHelper.evalString("action", getActionExpr(), 784 this, pageContext)) != null) 785 setAction(string); 786 787 if ((string = EvalHelper.evalString("module", getModuleExpr(), 788 this, pageContext)) != null) 789 setModule(string); 790 791 if ((string = EvalHelper.evalString("align", getAlignExpr(), 792 this, pageContext)) != null) 793 setAlign(string); 794 795 if ((string = EvalHelper.evalString("alt", getAltExpr(), 796 this, pageContext)) != null) 797 setAlt(string); 798 799 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 800 this, pageContext)) != null) 801 setAltKey(string); 802 803 if ((string = EvalHelper.evalString("border", getBorderExpr(), 804 this, pageContext)) != null) 805 setBorder(string); 806 807 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 808 this, pageContext)) != null) 809 setBundle(string); 810 811 if ((string = EvalHelper.evalString("contextRelative", getContextRelativeExpr(), 812 this, pageContext)) != null) 813 setContextRelative(string); 814 815 if ((string = EvalHelper.evalString("height", getHeightExpr(), 816 this, pageContext)) != null) 817 setHeight(string); 818 819 if ((string = EvalHelper.evalString("hspace", getHspaceExpr(), 820 this, pageContext)) != null) 821 setHspace(string); 822 823 if ((string = EvalHelper.evalString("imageName", getImageNameExpr(), 824 this, pageContext)) != null) 825 setImageName(string); 826 827 if ((string = EvalHelper.evalString("ismap", getIsmapExpr(), 828 this, pageContext)) != null) 829 setIsmap(string); 830 831 if ((string = EvalHelper.evalString("locale", getLocaleExpr(), 832 this, pageContext)) != null) 833 setLocale(string); 834 835 if ((string = EvalHelper.evalString("lowsrc", getLowsrcExpr(), 838 this, pageContext)) != null) 839 setLowsrc(string); 840 841 if ((string = EvalHelper.evalString("name", getNameExpr(), 842 this, pageContext)) != null) 843 setName(string); 844 845 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 846 this, pageContext)) != null) 847 setOnclick(string); 848 849 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 850 this, pageContext)) != null) 851 setOndblclick(string); 852 853 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 854 this, pageContext)) != null) 855 setOnkeydown(string); 856 857 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 858 this, pageContext)) != null) 859 setOnkeypress(string); 860 861 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 862 this, pageContext)) != null) 863 setOnkeyup(string); 864 865 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 866 this, pageContext)) != null) 867 setOnmousedown(string); 868 869 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 870 this, pageContext)) != null) 871 setOnmousemove(string); 872 873 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 874 this, pageContext)) != null) 875 setOnmouseout(string); 876 877 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 878 this, pageContext)) != null) 879 setOnmouseover(string); 880 881 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 882 this, pageContext)) != null) 883 setOnmouseup(string); 884 885 if ((string = EvalHelper.evalString("paramId", getParamIdExpr(), 886 this, pageContext)) != null) 887 setParamId(string); 888 889 if ((string = EvalHelper.evalString("page", getPageExpr(), 890 this, pageContext)) != null) 891 setPage(string); 892 893 if ((string = EvalHelper.evalString("pageKey", getPageKeyExpr(), 894 this, pageContext)) != null) 895 setPageKey(string); 896 897 if ((string = EvalHelper.evalString("paramName", getParamNameExpr(), 898 this, pageContext)) != null) 899 setParamName(string); 900 901 if ((string = EvalHelper.evalString("paramProperty", getParamPropertyExpr(), 902 this, pageContext)) != null) 903 setParamProperty(string); 904 905 if ((string = EvalHelper.evalString("paramScope", getParamScopeExpr(), 906 this, pageContext)) != null) 907 setParamScope(string); 908 909 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 910 this, pageContext)) != null) 911 setProperty(string); 912 913 if ((string = EvalHelper.evalString("scope", getScopeExpr(), 914 this, pageContext)) != null) 915 setScope(string); 916 917 if ((string = EvalHelper.evalString("src", getSrcExpr(), 918 this, pageContext)) != null) 919 setSrc(string); 920 921 if ((string = EvalHelper.evalString("srcKey", getSrcKeyExpr(), 922 this, pageContext)) != null) 923 setSrcKey(string); 924 925 if ((string = EvalHelper.evalString("style", getStyleExpr(), 926 this, pageContext)) != null) 927 setStyle(string); 928 929 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 930 this, pageContext)) != null) 931 setStyleClass(string); 932 933 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 934 this, pageContext)) != null) 935 setStyleId(string); 936 937 if ((string = EvalHelper.evalString("title", getTitleExpr(), 938 this, pageContext)) != null) 939 setTitle(string); 940 941 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 942 this, pageContext)) != null) 943 setTitleKey(string); 944 945 if ((bool = EvalHelper.evalBoolean("useLocalEncoding", getUseLocalEncodingExpr(), 946 this, pageContext)) != null) 947 setUseLocalEncoding(bool.booleanValue()); 948 949 if ((string = EvalHelper.evalString("usemap", getUsemapExpr(), 950 this, pageContext)) != null) 951 setUsemap(string); 952 953 if ((string = EvalHelper.evalString("vspace", getVspaceExpr(), 954 this, pageContext)) != null) 955 setVspace(string); 956 957 if ((string = EvalHelper.evalString("width", getWidthExpr(), 958 this, pageContext)) != null) 959 setWidth(string); 960 } 961 } 962 | Popular Tags |