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