1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.CheckboxTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELCheckboxTag extends CheckboxTag { 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 nameExpr; 93 97 private String onblurExpr; 98 102 private String onchangeExpr; 103 107 private String onclickExpr; 108 112 private String ondblclickExpr; 113 117 private String onfocusExpr; 118 122 private String onkeydownExpr; 123 127 private String onkeypressExpr; 128 132 private String onkeyupExpr; 133 137 private String onmousedownExpr; 138 142 private String onmousemoveExpr; 143 147 private String onmouseoutExpr; 148 152 private String onmouseoverExpr; 153 157 private String onmouseupExpr; 158 162 private String propertyExpr; 163 167 private String styleExpr; 168 172 private String styleClassExpr; 173 177 private String styleIdExpr; 178 182 private String tabindexExpr; 183 187 private String titleExpr; 188 192 private String titleKeyExpr; 193 197 private String valueExpr; 198 199 203 public String getAccesskeyExpr() { return (accesskeyExpr); } 204 208 public String getAltExpr() { return (altExpr); } 209 213 public String getAltKeyExpr() { return (altKeyExpr); } 214 218 public String getBundleExpr() { return (bundleExpr); } 219 223 public String getDisabledExpr() { return (disabledExpr); } 224 228 public String getErrorKeyExpr() { return (errorKeyExpr); } 229 233 public String getErrorStyleExpr() { return (errorStyleExpr); } 234 238 public String getErrorStyleClassExpr() { return (errorStyleClassExpr); } 239 243 public String getErrorStyleIdExpr() { return (errorStyleIdExpr); } 244 248 public String getIndexedExpr() { return (indexedExpr); } 249 253 public String getNameExpr() { return (nameExpr); } 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 getPropertyExpr() { return (propertyExpr); } 324 328 public String getStyleExpr() { return (styleExpr); } 329 333 public String getStyleClassExpr() { return (styleClassExpr); } 334 338 public String getStyleIdExpr() { return (styleIdExpr); } 339 343 public String getTabindexExpr() { return (tabindexExpr); } 344 348 public String getTitleExpr() { return (titleExpr); } 349 353 public String getTitleKeyExpr() { return (titleKeyExpr); } 354 358 public String getValueExpr() { return (valueExpr); } 359 360 364 public void setAccesskeyExpr(String accesskeyExpr) { this.accesskeyExpr = accesskeyExpr; } 365 369 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 370 374 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 375 379 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 380 384 public void setDisabledExpr(String disabledExpr) { this.disabledExpr = disabledExpr; } 385 389 public void setErrorKeyExpr(String errorKeyExpr) { this.errorKeyExpr = errorKeyExpr; } 390 394 public void setErrorStyleExpr(String errorStyleExpr) { this.errorStyleExpr = errorStyleExpr; } 395 399 public void setErrorStyleClassExpr(String errorStyleClassExpr) { this.errorStyleClassExpr = errorStyleClassExpr; } 400 404 public void setErrorStyleIdExpr(String errorStyleIdExpr) { this.errorStyleIdExpr = errorStyleIdExpr; } 405 409 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 410 414 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 415 419 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 420 424 public void setOnchangeExpr(String onchangeExpr) { this.onchangeExpr = onchangeExpr; } 425 429 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 430 434 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 435 439 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 440 444 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 445 449 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 450 454 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 455 459 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 460 464 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 465 469 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 470 474 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 475 479 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 480 484 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 485 489 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 490 494 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 495 499 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 500 504 public void setTabindexExpr(String tabindexExpr) { this.tabindexExpr = tabindexExpr; } 505 509 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 510 514 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 515 519 public void setValueExpr(String valueExpr) { this.valueExpr = valueExpr; } 520 521 524 public void release() 525 { 526 super.release(); 527 setAccesskeyExpr(null); 528 setAltExpr(null); 529 setAltKeyExpr(null); 530 setBundleExpr(null); 531 setDisabledExpr(null); 532 setErrorKey(null); 533 setErrorStyleExpr(null); 534 setErrorStyleClassExpr(null); 535 setErrorStyleIdExpr(null); 536 setIndexedExpr(null); 537 setNameExpr(null); 538 setOnblurExpr(null); 539 setOnchangeExpr(null); 540 setOnclickExpr(null); 541 setOndblclickExpr(null); 542 setOnfocusExpr(null); 543 setOnkeydownExpr(null); 544 setOnkeypressExpr(null); 545 setOnkeyupExpr(null); 546 setOnmousedownExpr(null); 547 setOnmousemoveExpr(null); 548 setOnmouseoutExpr(null); 549 setOnmouseoverExpr(null); 550 setOnmouseupExpr(null); 551 setPropertyExpr(null); 552 setStyleExpr(null); 553 setStyleClassExpr(null); 554 setStyleIdExpr(null); 555 setTabindexExpr(null); 556 setTitleExpr(null); 557 setTitleKeyExpr(null); 558 setValueExpr(null); 559 } 560 561 566 public int doStartTag() throws JspException { 567 evaluateExpressions(); 568 return (super.doStartTag()); 569 } 570 571 577 private void evaluateExpressions() throws JspException { 578 String string = null; 579 Boolean bool = null; 580 581 if ((string = EvalHelper.evalString("accesskey", getAccesskeyExpr(), 582 this, pageContext)) != null) 583 setAccesskey(string); 584 585 if ((string = EvalHelper.evalString("alt", getAltExpr(), 586 this, pageContext)) != null) 587 setAlt(string); 588 589 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 590 this, pageContext)) != null) 591 setAltKey(string); 592 593 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 594 this, pageContext)) != null) 595 setBundle(string); 596 597 if ((bool = EvalHelper.evalBoolean("disabled", getDisabledExpr(), 598 this, pageContext)) != null) 599 setDisabled(bool.booleanValue()); 600 601 if ((string = EvalHelper.evalString("errorKey", getErrorKeyExpr(), 602 this, pageContext)) != null) 603 setErrorKey(string); 604 605 if ((string = EvalHelper.evalString("errorStyle", getErrorStyleExpr(), 606 this, pageContext)) != null) 607 setErrorStyle(string); 608 609 if ((string = EvalHelper.evalString("errorStyleClass", getErrorStyleClassExpr(), 610 this, pageContext)) != null) 611 setErrorStyleClass(string); 612 613 if ((string = EvalHelper.evalString("errorStyleId", getErrorStyleIdExpr(), 614 this, pageContext)) != null) 615 setErrorStyleId(string); 616 617 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 618 this, pageContext)) != null) 619 setIndexed(bool.booleanValue()); 620 621 if ((string = EvalHelper.evalString("name", getNameExpr(), 622 this, pageContext)) != null) 623 setName(string); 624 625 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 626 this, pageContext)) != null) 627 setOnblur(string); 628 629 if ((string = EvalHelper.evalString("onchange", getOnchangeExpr(), 630 this, pageContext)) != null) 631 setOnchange(string); 632 633 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 634 this, pageContext)) != null) 635 setOnclick(string); 636 637 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 638 this, pageContext)) != null) 639 setOndblclick(string); 640 641 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 642 this, pageContext)) != null) 643 setOnfocus(string); 644 645 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 646 this, pageContext)) != null) 647 setOnkeydown(string); 648 649 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 650 this, pageContext)) != null) 651 setOnkeypress(string); 652 653 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 654 this, pageContext)) != null) 655 setOnkeyup(string); 656 657 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 658 this, pageContext)) != null) 659 setOnmousedown(string); 660 661 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 662 this, pageContext)) != null) 663 setOnmousemove(string); 664 665 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 666 this, pageContext)) != null) 667 setOnmouseout(string); 668 669 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 670 this, pageContext)) != null) 671 setOnmouseover(string); 672 673 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 674 this, pageContext)) != null) 675 setOnmouseup(string); 676 677 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 678 this, pageContext)) != null) 679 setProperty(string); 680 681 if ((string = EvalHelper.evalString("style", getStyleExpr(), 682 this, pageContext)) != null) 683 setStyle(string); 684 685 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 686 this, pageContext)) != null) 687 setStyleClass(string); 688 689 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 690 this, pageContext)) != null) 691 setStyleId(string); 692 693 if ((string = EvalHelper.evalString("tabindex", getTabindexExpr(), 694 this, pageContext)) != null) 695 setTabindex(string); 696 697 if ((string = EvalHelper.evalString("title", getTitleExpr(), 698 this, pageContext)) != null) 699 setTitle(string); 700 701 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 702 this, pageContext)) != null) 703 setTitleKey(string); 704 705 if ((string = EvalHelper.evalString("value", getValueExpr(), 706 this, pageContext)) != null) 707 setValue(string); 708 } 709 } 710 | Popular Tags |