craigmcc 01/03/06 14:25:43
Modified: src/doc release-notes-1.0-b2.xml struts-html.xml
src/share/org/apache/struts/taglib/html ImageTag.java
Log:
Add an optional "border" element to the <html:image> tag.
Submitted by: Misak Boulatian <[EMAIL PROTECTED]>
PR: Bugzilla #871
Revision Changes Path
1.3 +3 -0 jakarta-struts/src/doc/release-notes-1.0-b2.xml
Index: release-notes-1.0-b2.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/src/doc/release-notes-1.0-b2.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- release-notes-1.0-b2.xml 2001/03/06 22:09:49 1.2
+++ release-notes-1.0-b2.xml 2001/03/06 22:25:39 1.3
@@ -38,6 +38,9 @@
(possibly calculated) anchor ("#xxx") in the generated hyperlink.</li>
<li>The <code><html:base></code> tag now accepts an optional
<code>target</code> attribute.</li>
+ <li>The <code><html:image></code> tag now accepts an optional
+ <code>border</code> attribute, to define the border with around
+ this image.</li>
</ul>
<p>The following new features have been added to the
1.20 +9 -0 jakarta-struts/src/doc/struts-html.xml
Index: struts-html.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/src/doc/struts-html.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- struts-html.xml 2001/03/06 22:09:50 1.19
+++ struts-html.xml 2001/03/06 22:25:39 1.20
@@ -1318,6 +1318,15 @@
</info>
</attribute>
+ <attribute>
+ <name>border</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <info>
+ <p>The width (in pixels) of the border around this image.</p>
+ </info>
+ </attribute>
+
<attribute>
<name>bundle</name>
<required>false</required>
1.6 +23 -4
jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java
Index: ImageTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ImageTag.java 2001/02/27 01:41:34 1.5
+++ ImageTag.java 2001/03/06 22:25:42 1.6
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java,v 1.5
2001/02/27 01:41:34 craigmcc Exp $
- * $Revision: 1.5 $
- * $Date: 2001/02/27 01:41:34 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java,v 1.6
2001/03/06 22:25:42 craigmcc Exp $
+ * $Revision: 1.6 $
+ * $Date: 2001/03/06 22:25:42 $
*
* ====================================================================
*
@@ -81,7 +81,7 @@
* Tag for input fields of type "image".
*
* @author Oleg V Alexeev
- * @version $Revision: 1.5 $ $Date: 2001/02/27 01:41:34 $
+ * @version $Revision: 1.6 $ $Date: 2001/03/06 22:25:42 $
*/
public class ImageTag extends SubmitTag {
@@ -128,6 +128,20 @@
/**
+ * The border size around the image.
+ */
+ protected String border = null;
+
+ public String getBorder() {
+ return (this.border);
+ }
+
+ public void setBorder(String border) {
+ this.border = border;
+ }
+
+
+ /**
* The servlet context attribute key for our resources.
*/
protected String bundle = Action.MESSAGES_KEY;
@@ -266,6 +280,11 @@
if (tmp != null) {
results.append(" alt=\"");
results.append(tmp);
+ results.append("\"");
+ }
+ if (border != null) {
+ results.append(" border=\"");
+ results.append(border);
results.append("\"");
}
if (value != null) {