1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.FileTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELFileTag extends FileTag { 37 38 42 private String accesskeyExpr; 43 47 private String acceptExpr; 48 52 private String altExpr; 53 57 private String altKeyExpr; 58 62 private String bundleExpr; 63 67 private String disabledExpr; 68 72 private String errorKeyExpr; 73 77 private String errorStyleExpr; 78 82 private String errorStyleClassExpr; 83 87 private String errorStyleIdExpr; 88 92 private String indexedExpr; 93 97 private String maxlengthExpr; 98 102 private String nameExpr; 103 107 private String onblurExpr; 108 112 private String onchangeExpr; 113 117 private String onclickExpr; 118 122 private String ondblclickExpr; 123 127 private String onfocusExpr; 128 132 private String onkeydownExpr; 133 137 private String onkeypressExpr; 138 142 private String onkeyupExpr; 143 147 private String onmousedownExpr; 148 152 private String onmousemoveExpr; 153 157 private String onmouseoutExpr; 158 162 private String onmouseoverExpr; 163 167 private String onmouseupExpr; 168 172 private String propertyExpr; 173 177 private String sizeExpr; 178 182 private String styleExpr; 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 getAcceptExpr() { return (acceptExpr); } 224 228 public String getAltExpr() { return (altExpr); } 229 233 public String getAltKeyExpr() { return (altKeyExpr); } 234 238 public String getBundleExpr() { return (bundleExpr); } 239 243 public String getDisabledExpr() { return (disabledExpr); } 244 248 public String getErrorKeyExpr() { return (errorKeyExpr); } 249 253 public String getErrorStyleExpr() { return (errorStyleExpr); } 254 258 public String getErrorStyleClassExpr() { return (errorStyleClassExpr); } 259 263 public String getErrorStyleIdExpr() { return (errorStyleIdExpr); } 264 268 public String getIndexedExpr() { return (indexedExpr); } 269 273 public String getMaxlengthExpr() { return (maxlengthExpr); } 274 278 public String getNameExpr() { return (nameExpr); } 279 283 public String getOnblurExpr() { return (onblurExpr); } 284 288 public String getOnchangeExpr() { return (onchangeExpr); } 289 293 public String getOnclickExpr() { return (onclickExpr); } 294 298 public String getOndblclickExpr() { return (ondblclickExpr); } 299 303 public String getOnfocusExpr() { return (onfocusExpr); } 304 308 public String getOnkeydownExpr() { return (onkeydownExpr); } 309 313 public String getOnkeypressExpr() { return (onkeypressExpr); } 314 318 public String getOnkeyupExpr() { return (onkeyupExpr); } 319 323 public String getOnmousedownExpr() { return (onmousedownExpr); } 324 328 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 329 333 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 334 338 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 339 343 public String getOnmouseupExpr() { return (onmouseupExpr); } 344 348 public String getPropertyExpr() { return (propertyExpr); } 349 353 public String getSizeExpr() { return (sizeExpr); } 354 358 public String getStyleExpr() { return (styleExpr); } 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 setAcceptExpr(String acceptExpr) { this.acceptExpr = acceptExpr; } 400 404 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 405 409 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 410 414 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 415 419 public void setDisabledExpr(String disabledExpr) { this.disabledExpr = disabledExpr; } 420 424 public void setErrorKeyExpr(String errorKeyExpr) { this.errorKeyExpr = errorKeyExpr; } 425 429 public void setErrorStyleExpr(String errorStyleExpr) { this.errorStyleExpr = errorStyleExpr; } 430 434 public void setErrorStyleClassExpr(String errorStyleClassExpr) { this.errorStyleClassExpr = errorStyleClassExpr; } 435 439 public void setErrorStyleIdExpr(String errorStyleIdExpr) { this.errorStyleIdExpr = errorStyleIdExpr; } 440 444 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 445 449 public void setMaxlengthExpr(String maxlengthExpr) { this.maxlengthExpr = maxlengthExpr; } 450 454 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 455 459 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 460 464 public void setOnchangeExpr(String onchangeExpr) { this.onchangeExpr = onchangeExpr; } 465 469 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 470 474 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 475 479 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 480 484 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 485 489 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 490 494 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 495 499 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 500 504 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 505 509 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 510 514 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 515 519 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 520 524 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 525 529 public void setSizeExpr(String sizeExpr) { this.sizeExpr = sizeExpr; } 530 534 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 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 setAcceptExpr(null); 574 setAltExpr(null); 575 setAltKeyExpr(null); 576 setBundleExpr(null); 577 setDisabledExpr(null); 578 setErrorKey(null); 579 setErrorStyleExpr(null); 580 setErrorStyleClassExpr(null); 581 setErrorStyleIdExpr(null); 582 setIndexedExpr(null); 583 setMaxlengthExpr(null); 584 setNameExpr(null); 585 setOnblurExpr(null); 586 setOnchangeExpr(null); 587 setOnclickExpr(null); 588 setOndblclickExpr(null); 589 setOnfocusExpr(null); 590 setOnkeydownExpr(null); 591 setOnkeypressExpr(null); 592 setOnkeyupExpr(null); 593 setOnmousedownExpr(null); 594 setOnmousemoveExpr(null); 595 setOnmouseoutExpr(null); 596 setOnmouseoverExpr(null); 597 setOnmouseupExpr(null); 598 setPropertyExpr(null); 599 setSizeExpr(null); 600 setStyleExpr(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("accept", getAcceptExpr(), 634 this, pageContext)) != null) 635 setAccept(string); 636 637 if ((string = EvalHelper.evalString("alt", getAltExpr(), 638 this, pageContext)) != null) 639 setAlt(string); 640 641 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 642 this, pageContext)) != null) 643 setAltKey(string); 644 645 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 646 this, pageContext)) != null) 647 setBundle(string); 648 649 if ((bool = EvalHelper.evalBoolean("disabled", getDisabledExpr(), 650 this, pageContext)) != null) 651 setDisabled(bool.booleanValue()); 652 653 if ((string = EvalHelper.evalString("errorKey", getErrorKeyExpr(), 654 this, pageContext)) != null) 655 setErrorKey(string); 656 657 if ((string = EvalHelper.evalString("errorStyle", getErrorStyleExpr(), 658 this, pageContext)) != null) 659 setErrorStyle(string); 660 661 if ((string = EvalHelper.evalString("errorStyleClass", getErrorStyleClassExpr(), 662 this, pageContext)) != null) 663 setErrorStyleClass(string); 664 665 if ((string = EvalHelper.evalString("errorStyleId", getErrorStyleIdExpr(), 666 this, pageContext)) != null) 667 setErrorStyleId(string); 668 669 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 670 this, pageContext)) != null) 671 setIndexed(bool.booleanValue()); 672 673 if ((string = EvalHelper.evalString("maxlength", getMaxlengthExpr(), 674 this, pageContext)) != null) 675 setMaxlength(string); 676 677 if ((string = EvalHelper.evalString("name", getNameExpr(), 678 this, pageContext)) != null) 679 setName(string); 680 681 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 682 this, pageContext)) != null) 683 setOnblur(string); 684 685 if ((string = EvalHelper.evalString("onchange", getOnchangeExpr(), 686 this, pageContext)) != null) 687 setOnchange(string); 688 689 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 690 this, pageContext)) != null) 691 setOnclick(string); 692 693 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 694 this, pageContext)) != null) 695 setOndblclick(string); 696 697 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 698 this, pageContext)) != null) 699 setOnfocus(string); 700 701 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 702 this, pageContext)) != null) 703 setOnkeydown(string); 704 705 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 706 this, pageContext)) != null) 707 setOnkeypress(string); 708 709 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 710 this, pageContext)) != null) 711 setOnkeyup(string); 712 713 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 714 this, pageContext)) != null) 715 setOnmousedown(string); 716 717 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 718 this, pageContext)) != null) 719 setOnmousemove(string); 720 721 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 722 this, pageContext)) != null) 723 setOnmouseout(string); 724 725 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 726 this, pageContext)) != null) 727 setOnmouseover(string); 728 729 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 730 this, pageContext)) != null) 731 setOnmouseup(string); 732 733 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 734 this, pageContext)) != null) 735 setProperty(string); 736 737 if ((string = EvalHelper.evalString("size", getSizeExpr(), 738 this, pageContext)) != null) 739 setSize(string); 740 741 if ((string = EvalHelper.evalString("style", getStyleExpr(), 742 this, pageContext)) != null) 743 setStyle(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 |