You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/05/31 15:30:18 UTC

svn commit: r410518 - in /myfaces/tomahawk/trunk/core/src/main: java/org/apache/myfaces/component/html/ext/HtmlInputText.java java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java tld/tomahawk.tld

Author: matzew
Date: Wed May 31 06:30:17 2006
New Revision: 410518

URL: http://svn.apache.org/viewvc?rev=410518&view=rev
Log:
added autocomplete attribute to tomahawk inputText extension

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlInputText.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlInputText.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlInputText.java?rev=410518&r1=410517&r2=410518&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlInputText.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlInputText.java Wed May 31 06:30:17 2006
@@ -51,6 +51,7 @@
 
     private static final boolean DEFAULT_DISPLAYVALUEONLY = false;
 
+    private String _autocomplete = null;
     private String _enabledOnUserRole = null;
     private String _visibleOnUserRole = null;
     
@@ -65,6 +66,18 @@
         super();
 
         setRendererType(DEFAULT_RENDERER_TYPE);
+    }
+
+    public void setAutocomplete(String autocomplete)
+    {
+        _autocomplete = autocomplete;
+    }
+
+    public String getAutocomplete()
+    {
+        if (_autocomplete != null) return _autocomplete;
+        ValueBinding vb = getValueBinding("autocomplete");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
     }
 
     public void setEnabledOnUserRole(String enabledOnUserRole)

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java?rev=410518&r1=410517&r2=410518&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextTag.java Wed May 31 06:30:17 2006
@@ -40,6 +40,7 @@
         return HtmlInputText.DEFAULT_RENDERER_TYPE;
     }
 
+    private String _autocomplete;
     private String _enabledOnUserRole;
     private String _visibleOnUserRole;
     private String _datafld;
@@ -54,6 +55,7 @@
     public void release() {
         super.release();
 
+        _autocomplete = null;
         _enabledOnUserRole=null;
         _visibleOnUserRole=null;
         _datafld=null;
@@ -68,6 +70,7 @@
     protected void setProperties(UIComponent component)
     {
         super.setProperties(component);
+        setStringProperty(component, HTML.AUTOCOMPLETE_ATTR, _autocomplete);
         setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
         setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
@@ -77,6 +80,11 @@
         setBooleanProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_ATTR, _displayValueOnly);
         setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_ATTR, _displayValueOnlyStyle);
         setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR, _displayValueOnlyStyleClass);
+    }
+
+    public void setAutocomplete(String autocomplete)
+    {
+        _autocomplete = autocomplete;
     }
 
     public void setEnabledOnUserRole(String enabledOnUserRole)

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld?rev=410518&r1=410517&r2=410518&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld Wed May 31 06:30:17 2006
@@ -329,6 +329,16 @@
             Unless otherwise specified, all attributes accept static values or EL expressions.
         </description>        
          <attribute>
+            <name>autocomplete</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.String</type>
+            <description>
+                Non HTML standard attribute to disable browser's autocomplete
+                function.
+            </description>
+        </attribute>
+         <attribute>
             <name>disabledOnClientSide</name>
             <required>false</required>
             <rtexprvalue>false</rtexprvalue>