craigmcc 01/06/01 10:13:39
Modified: src/share/org/apache/struts/taglib/html ButtonTag.java
Log:
Port fix for Bugzilla #1890.
Revision Changes Path
1.4 +20 -4
jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java
Index: ButtonTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ButtonTag.java 2001/04/18 01:31:14 1.3
+++ ButtonTag.java 2001/06/01 17:13:36 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 1.3
2001/04/18 01:31:14 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2001/04/18 01:31:14 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 1.4
2001/06/01 17:13:36 craigmcc Exp $
+ * $Revision: 1.4 $
+ * $Date: 2001/06/01 17:13:36 $
*
* ====================================================================
*
@@ -74,7 +74,7 @@
* Renders an HTML BUTTON tag within the Struts framework.
*
* @author Don Clasen
- * @version $Revision: 1.3 $ $Date: 2001/04/18 01:31:14 $
+ * @version $Revision: 1.4 $ $Date: 2001/06/01 17:13:36 $
*/
public class ButtonTag extends BaseHandlerTag {
@@ -152,6 +152,22 @@
}
+
+ /**
+ * Save the associated label from the body content (if any).
+ * @exception JspException if a JSP exception has occurred
+ */
+ public int doAfterBody() throws JspException {
+
+ if (bodyContent != null) {
+ String value = bodyContent.getString().trim();
+ if (value.length() > 0)
+ text = value;
+ }
+ return (SKIP_BODY);
+
+ }
+
/**
* Process the end of this tag.