1 18 19 20 package org.apache.struts.taglib.html; 21 22 import javax.servlet.jsp.JspException ; 23 24 25 30 31 public class CancelTag extends SubmitTag { 32 33 34 36 37 38 public String getOnclick() { 39 return super.getOnclick() == null ? "bCancel=true;" 40 : super.getOnclick(); 41 } 42 43 45 public CancelTag() { 46 47 super(); 48 property = Constants.CANCEL_PROPERTY; 49 50 } 51 52 54 59 protected String getElementOpen() { 60 return "<input type=\"submit\""; 61 } 62 63 67 protected String prepareName() throws JspException { 68 return property; 69 } 70 71 76 protected String getDefaultValue() { 77 return "Cancel"; 78 } 79 80 83 public void release() { 84 85 super.release(); 86 property = Constants.CANCEL_PROPERTY; 87 88 } 89 90 } 91 | Popular Tags |