You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2001/05/04 21:25:20 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html BaseHandlerTag.java FormTag.java
craigmcc 01/05/04 12:25:19
Modified: src/share/org/apache/struts/taglib/html BaseHandlerTag.java
FormTag.java
Log:
Add the styleId property to the correct (non-deprecated) versions of the
BaseHandlerTag and FormTag classes this time.
PR: Bugzilla #1602
Submitted by: Hal Deadman <ha...@tallan.com>
Revision Changes Path
1.2 +25 -6 jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java
Index: BaseHandlerTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseHandlerTag.java 2001/01/06 21:50:39 1.1
+++ BaseHandlerTag.java 2001/05/04 19:25:16 1.2
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 1.1 2001/01/06 21:50:39 mschachter Exp $
- * $Revision: 1.1 $
- * $Date: 2001/01/06 21:50:39 $
+ * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 1.2 2001/05/04 19:25:16 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2001/05/04 19:25:16 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -71,7 +71,7 @@
* appropriate implementations of these.
*
* @author Don Clasen
- * @version $Revision: 1.1 $ $Date: 2001/01/06 21:50:39 $
+ * @version $Revision: 1.2 $ $Date: 2001/05/04 19:25:16 $
*/
public abstract class BaseHandlerTag extends BodyTagSupport {
@@ -153,6 +153,9 @@
/** Named Style class associated with component. */
private String styleClass = null;
+ /** Identifier associated with component. */
+ private String styleId = null;
+
// ------------------------------------------------------------- Properties
// Navigation Management
@@ -348,6 +351,16 @@
return styleClass;
}
+ /** Sets the style id attribute. */
+ public void setStyleId(String styleId) {
+ this.styleId = styleId;
+ }
+
+ /** Returns the style id attribute. */
+ public String getStyleId() {
+ return styleId;
+ }
+
// --------------------------------------------------------- Public Methods
@@ -375,6 +388,7 @@
onfocus = null;
style = null;
styleClass = null;
+ styleId = null;
}
@@ -396,6 +410,11 @@
if (styleClass != null) {
styles.append(" class=\"");
styles.append(styleClass);
+ styles.append("\"");
+ }
+ if (styleId != null) {
+ styles.append(" id=\"");
+ styles.append(styleId);
styles.append("\"");
}
return styles.toString();
1.12 +39 -4 jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java
Index: FormTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FormTag.java 2001/04/29 03:11:39 1.11
+++ FormTag.java 2001/05/04 19:25:17 1.12
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.11 2001/04/29 03:11:39 craigmcc Exp $
- * $Revision: 1.11 $
- * $Date: 2001/04/29 03:11:39 $
+ * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.12 2001/05/04 19:25:17 craigmcc Exp $
+ * $Revision: 1.12 $
+ * $Date: 2001/05/04 19:25:17 $
*
* ====================================================================
*
@@ -87,7 +87,7 @@
* properties correspond to the various fields of the form.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.11 $ $Date: 2001/04/29 03:11:39 $
+ * @version $Revision: 1.12 $ $Date: 2001/05/04 19:25:17 $
*/
public class FormTag extends TagSupport {
@@ -181,6 +181,12 @@
/**
+ * The identifier associated with this tag.
+ */
+ protected String styleId = null;
+
+
+ /**
* The window target.
*/
protected String target = null;
@@ -394,6 +400,29 @@
/**
+ * Return the style identifier for this tag.
+ */
+ public String getStyleId() {
+
+ return (this.styleId);
+
+ }
+
+
+ /**
+ * Set the style identifier for this tag.
+ *
+ * @param styleId The new style identifier
+ */
+ public void setStyleId(String styleId) {
+
+ this.styleId = styleId;
+
+ }
+
+
+
+ /**
* Return the window target.
*/
public String getTarget() {
@@ -487,6 +516,11 @@
results.append(style);
results.append("\"");
}
+ if (styleId != null) {
+ results.append(" id=\"");
+ results.append(styleId);
+ results.append("\"");
+ }
if (target != null) {
results.append(" target=\"");
results.append(target);
@@ -607,6 +641,7 @@
servlet = null;
style = null;
styleClass = null;
+ styleId = null;
target = null;
type = null;