1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.SubmitTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELSubmitTag extends SubmitTag { 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 indexedExpr; 68 72 private String onblurExpr; 73 77 private String onchangeExpr; 78 82 private String onclickExpr; 83 87 private String ondblclickExpr; 88 92 private String onfocusExpr; 93 97 private String onkeydownExpr; 98 102 private String onkeypressExpr; 103 107 private String onkeyupExpr; 108 112 private String onmousedownExpr; 113 117 private String onmousemoveExpr; 118 122 private String onmouseoutExpr; 123 127 private String onmouseoverExpr; 128 132 private String onmouseupExpr; 133 137 private String propertyExpr; 138 142 private String styleExpr; 143 147 private String styleClassExpr; 148 152 private String styleIdExpr; 153 157 private String tabindexExpr; 158 162 private String titleExpr; 163 167 private String titleKeyExpr; 168 172 private String valueExpr; 173 174 178 public String getAccesskeyExpr() { return (accessKeyExpr); } 179 183 public String getAltExpr() { return (altExpr); } 184 188 public String getAltKeyExpr() { return (altKeyExpr); } 189 193 public String getBundleExpr() { return (bundleExpr); } 194 198 public String getDisabledExpr() { return (disabledExpr); } 199 203 public String getIndexedExpr() { return (indexedExpr); } 204 208 public String getOnblurExpr() { return (onblurExpr); } 209 213 public String getOnchangeExpr() { return (onchangeExpr); } 214 218 public String getOnclickExpr() { return (onclickExpr); } 219 223 public String getOndblclickExpr() { return (ondblclickExpr); } 224 228 public String getOnfocusExpr() { return (onfocusExpr); } 229 233 public String getOnkeydownExpr() { return (onkeydownExpr); } 234 238 public String getOnkeypressExpr() { return (onkeypressExpr); } 239 243 public String getOnkeyupExpr() { return (onkeyupExpr); } 244 248 public String getOnmousedownExpr() { return (onmousedownExpr); } 249 253 public String getOnmousemoveExpr() { return (onmousemoveExpr); } 254 258 public String getOnmouseoutExpr() { return (onmouseoutExpr); } 259 263 public String getOnmouseoverExpr() { return (onmouseoverExpr); } 264 268 public String getOnmouseupExpr() { return (onmouseupExpr); } 269 273 public String getPropertyExpr() { return (propertyExpr); } 274 278 public String getStyleExpr() { return (styleExpr); } 279 283 public String getStyleClassExpr() { return (styleClassExpr); } 284 288 public String getStyleIdExpr() { return (styleIdExpr); } 289 293 public String getTabindexExpr() { return (tabindexExpr); } 294 298 public String getTitleExpr() { return (titleExpr); } 299 303 public String getTitleKeyExpr() { return (titleKeyExpr); } 304 308 public String getValueExpr() { return (valueExpr); } 309 310 314 public void setAccesskeyExpr(String accessKeyExpr) { this.accessKeyExpr = accessKeyExpr; } 315 319 public void setAltExpr(String altExpr) { this.altExpr = altExpr; } 320 324 public void setAltKeyExpr(String altKeyExpr) { this.altKeyExpr = altKeyExpr; } 325 329 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 330 334 public void setDisabledExpr(String disabledExpr) { this.disabledExpr = disabledExpr; } 335 339 public void setIndexedExpr(String indexedExpr) { this.indexedExpr = indexedExpr; } 340 344 public void setOnblurExpr(String onblurExpr) { this.onblurExpr = onblurExpr; } 345 349 public void setOnchangeExpr(String onchangeExpr) { this.onchangeExpr = onchangeExpr; } 350 354 public void setOnclickExpr(String onclickExpr) { this.onclickExpr = onclickExpr; } 355 359 public void setOndblclickExpr(String ondblclickExpr) { this.ondblclickExpr = ondblclickExpr; } 360 364 public void setOnfocusExpr(String onfocusExpr) { this.onfocusExpr = onfocusExpr; } 365 369 public void setOnkeydownExpr(String onkeydownExpr) { this.onkeydownExpr = onkeydownExpr; } 370 374 public void setOnkeypressExpr(String onkeypressExpr) { this.onkeypressExpr = onkeypressExpr; } 375 379 public void setOnkeyupExpr(String onkeyupExpr) { this.onkeyupExpr = onkeyupExpr; } 380 384 public void setOnmousedownExpr(String onmousedownExpr) { this.onmousedownExpr = onmousedownExpr; } 385 389 public void setOnmousemoveExpr(String onmousemoveExpr) { this.onmousemoveExpr = onmousemoveExpr; } 390 394 public void setOnmouseoutExpr(String onmouseoutExpr) { this.onmouseoutExpr = onmouseoutExpr; } 395 399 public void setOnmouseoverExpr(String onmouseoverExpr) { this.onmouseoverExpr = onmouseoverExpr; } 400 404 public void setOnmouseupExpr(String onmouseupExpr) { this.onmouseupExpr = onmouseupExpr; } 405 409 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 410 414 public void setStyleExpr(String styleExpr) { this.styleExpr = styleExpr; } 415 419 public void setStyleClassExpr(String styleClassExpr) { this.styleClassExpr = styleClassExpr; } 420 424 public void setStyleIdExpr(String styleIdExpr) { this.styleIdExpr = styleIdExpr; } 425 429 public void setTabindexExpr(String tabindexExpr) { this.tabindexExpr = tabindexExpr; } 430 434 public void setTitleExpr(String titleExpr) { this.titleExpr = titleExpr; } 435 439 public void setTitleKeyExpr(String titleKeyExpr) { this.titleKeyExpr = titleKeyExpr; } 440 444 public void setValueExpr(String valueExpr) { this.valueExpr = valueExpr; } 445 446 449 public void release() 450 { 451 super.release(); 452 setAccesskeyExpr(null); 453 setAltExpr(null); 454 setAltKeyExpr(null); 455 setBundleExpr(null); 456 setDisabledExpr(null); 457 setIndexedExpr(null); 458 setOnblurExpr(null); 459 setOnchangeExpr(null); 460 setOnclickExpr(null); 461 setOndblclickExpr(null); 462 setOnfocusExpr(null); 463 setOnkeydownExpr(null); 464 setOnkeypressExpr(null); 465 setOnkeyupExpr(null); 466 setOnmousedownExpr(null); 467 setOnmousemoveExpr(null); 468 setOnmouseoutExpr(null); 469 setOnmouseoverExpr(null); 470 setOnmouseupExpr(null); 471 setPropertyExpr(null); 472 setStyleExpr(null); 473 setStyleClassExpr(null); 474 setStyleIdExpr(null); 475 setTabindexExpr(null); 476 setTitleExpr(null); 477 setTitleKeyExpr(null); 478 setValueExpr(null); 479 } 480 481 486 public int doStartTag() throws JspException { 487 evaluateExpressions(); 488 return (super.doStartTag()); 489 } 490 491 497 private void evaluateExpressions() throws JspException { 498 String string = null; 499 Boolean bool = null; 500 501 if ((string = EvalHelper.evalString("accessKey", getAccesskeyExpr(), 502 this, pageContext)) != null) 503 setAccesskey(string); 504 505 if ((string = EvalHelper.evalString("alt", getAltExpr(), 506 this, pageContext)) != null) 507 setAlt(string); 508 509 if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), 510 this, pageContext)) != null) 511 setAltKey(string); 512 513 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 514 this, pageContext)) != null) 515 setBundle(string); 516 517 if ((bool = EvalHelper.evalBoolean("disabled", getDisabledExpr(), 518 this, pageContext)) != null) 519 setDisabled(bool.booleanValue()); 520 521 if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), 522 this, pageContext)) != null) 523 setIndexed(bool.booleanValue()); 524 525 if ((string = EvalHelper.evalString("onblur", getOnblurExpr(), 526 this, pageContext)) != null) 527 setOnblur(string); 528 529 if ((string = EvalHelper.evalString("onchange", getOnchangeExpr(), 530 this, pageContext)) != null) 531 setOnchange(string); 532 533 if ((string = EvalHelper.evalString("onclick", getOnclickExpr(), 534 this, pageContext)) != null) 535 setOnclick(string); 536 537 if ((string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), 538 this, pageContext)) != null) 539 setOndblclick(string); 540 541 if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), 542 this, pageContext)) != null) 543 setOnfocus(string); 544 545 if ((string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), 546 this, pageContext)) != null) 547 setOnkeydown(string); 548 549 if ((string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), 550 this, pageContext)) != null) 551 setOnkeypress(string); 552 553 if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), 554 this, pageContext)) != null) 555 setOnkeyup(string); 556 557 if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), 558 this, pageContext)) != null) 559 setOnmousedown(string); 560 561 if ((string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), 562 this, pageContext)) != null) 563 setOnmousemove(string); 564 565 if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), 566 this, pageContext)) != null) 567 setOnmouseout(string); 568 569 if ((string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), 570 this, pageContext)) != null) 571 setOnmouseover(string); 572 573 if ((string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), 574 this, pageContext)) != null) 575 setOnmouseup(string); 576 577 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 578 this, pageContext)) != null) 579 setProperty(string); 580 581 if ((string = EvalHelper.evalString("style", getStyleExpr(), 582 this, pageContext)) != null) 583 setStyle(string); 584 585 if ((string = EvalHelper.evalString("styleClass", getStyleClassExpr(), 586 this, pageContext)) != null) 587 setStyleClass(string); 588 589 if ((string = EvalHelper.evalString("styleId", getStyleIdExpr(), 590 this, pageContext)) != null) 591 setStyleId(string); 592 593 if ((string = EvalHelper.evalString("tabindex", getTabindexExpr(), 594 this, pageContext)) != null) 595 setTabindex(string); 596 597 if ((string = EvalHelper.evalString("title", getTitleExpr(), 598 this, pageContext)) != null) 599 setTitle(string); 600 601 if ((string = EvalHelper.evalString("titleKey", getTitleKeyExpr(), 602 this, pageContext)) != null) 603 setTitleKey(string); 604 605 if ((string = EvalHelper.evalString("value", getValueExpr(), 606 this, pageContext)) != null) 607 setValue(string); 608 } 609 } 610 | Popular Tags |