struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r684305 - in /struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main: java/org/apache/struts/taglib/html/ resources/META-INF/tld/
Date Sat, 09 Aug 2008 17:43:01 GMT
Author: niallp
Date: Sat Aug  9 10:43:00 2008
New Revision: 684305

URL: http://svn.apache.org/viewvc?rev=684305&view=rev
Log:
STR-2810 Add non-standard autocomplete attribute (only renders if not in XHTML mode), but
leave autocomplete attributes in TLD commented out so that it is not enabled by default -
thanks to Mark Lowe

Modified:
    struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseFieldTag.java
    struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseInputTag.java
    struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java
    struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/resources/META-INF/tld/struts-html.tld

Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseFieldTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseFieldTag.java?rev=684305&r1=684304&r2=684305&view=diff
==============================================================================
--- struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseFieldTag.java
(original)
+++ struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseFieldTag.java
Sat Aug  9 10:43:00 2008
@@ -102,6 +102,9 @@
         prepareValue(results);
         results.append(this.prepareEventHandlers());
         results.append(this.prepareStyles());
+        if (!isXhtml()) {
+            prepareAttribute(results, "autocomplete", getAutocomplete());
+        }
         prepareOtherAttributes(results);
         results.append(this.getElementClose());
 

Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseInputTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseInputTag.java?rev=684305&r1=684304&r2=684305&view=diff
==============================================================================
--- struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseInputTag.java
(original)
+++ struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/BaseInputTag.java
Sat Aug  9 10:43:00 2008
@@ -41,6 +41,11 @@
     // ----------------------------------------------------- Instance Variables
 
     /**
+     * Autocomplete non standard attribute
+     */
+    protected String autocomplete = null;
+
+    /**
      * The number of character columns for this field, or negative for no
      * limit.
      */
@@ -73,6 +78,21 @@
     protected String name = Constants.BEAN_KEY;
 
     // ------------------------------------------------------------- Properties
+
+    /**
+     * Return autocomplete
+     */
+    public String getAutocomplete() {
+        return autocomplete;
+    }
+
+    /**
+     * Activate/disactivate autocompletion (on/off)
+     */
+    public void setAutocomplete(String autocomplete) {
+        this.autocomplete = autocomplete;
+    }
+
     public String getName() {
         return (this.name);
     }
@@ -228,6 +248,7 @@
      */
     public void release() {
         super.release();
+        autocomplete = null;
         name = Constants.BEAN_KEY;
         cols = null;
         maxlength = null;

Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java?rev=684305&r1=684304&r2=684305&view=diff
==============================================================================
--- struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java
(original)
+++ struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java
Sat Aug  9 10:43:00 2008
@@ -68,6 +68,11 @@
     protected String action = null;
 
     /**
+     * Autocomplete non standard attribute
+     */
+    protected String autocomplete = null;
+
+    /**
      * A postback action URL to which this form should be submitted, if any.
      */
     private String postbackAction = null;
@@ -229,6 +234,20 @@
     }
 
     /**
+     * Return autocomplete
+     */
+    public String getAutocomplete() {
+        return autocomplete;
+    }
+
+    /**
+     * Activate/disactivate autocompletion (on/off)
+     */
+    public void setAutocomplete(String autocomplete) {
+        this.autocomplete = autocomplete;
+    }
+
+    /**
      * Return the content encoding used when submitting this form.
      */
     public String getEnctype() {
@@ -548,6 +567,9 @@
         renderAttribute(results, "onsubmit", getOnsubmit());
         renderAttribute(results, "style", getStyle());
         renderAttribute(results, "target", getTarget());
+        if (!isXhtml()) {
+            renderAttribute(results, "autocomplete", getAutocomplete());
+        }
 
         // Hook for additional attributes
         renderOtherAttributes(results);
@@ -759,6 +781,7 @@
     public void release() {
         super.release();
         action = null;
+        autocomplete = null;
         moduleConfig = null;
         enctype = null;
         dir = null;

Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/resources/META-INF/tld/struts-html.tld
URL: http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/resources/META-INF/tld/struts-html.tld?rev=684305&r1=684304&r2=684305&view=diff
==============================================================================
--- struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/resources/META-INF/tld/struts-html.tld
(original)
+++ struts/struts1/branches/STRUTS_1_3_BRANCH/taglib/src/main/resources/META-INF/tld/struts-html.tld
Sat Aug  9 10:43:00 2008
@@ -1941,6 +1941,14 @@
           ]]>
             </description>
         </attribute>
+        <!-- autocomplete is a non-standard and not supported, uncomment to enable -->
+        <!--
+        <attribute>
+            <name>autocomplete</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+         -->
         <attribute>
             <name>dir</name>
             <required>false</required>
@@ -6002,6 +6010,14 @@
                 ]]>
             </description>
         </attribute>
+        <!-- autocomplete is a non-standard and not supported, uncomment to enable -->
+        <!--
+        <attribute>
+            <name>autocomplete</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+         -->
         <attribute>
             <name>bundle</name>
             <required>false</required>
@@ -8323,6 +8339,14 @@
                 ]]>
             </description>
         </attribute>
+        <!-- autocomplete is a non-standard and not supported, uncomment to enable -->
+        <!--
+        <attribute>
+            <name>autocomplete</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+         -->
         <attribute>
             <name>bundle</name>
             <required>false</required>



Mime
View raw message