Class AutoComplete

  • All Implemented Interfaces:
    TagBase, InputAttributable, java.io.Serializable, java.lang.Cloneable


    public class AutoComplete
    extends AbstractValueSetAttribute
    implements InputAttributable
    autocomplete attribute for the element.
     This attribute indicates whether the value of the control can be automatically completed by the browser.
     Possible values are:
     off: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.
     on: The browser is allowed to automatically complete the value based on values that the user has entered during previous uses, however on does not provide any further information about what kind of data the user might be expected to enter.
     name: Full name
     honorific-prefix: Prefix or title (e.g. "Mr.", "Ms.", "Dr.", "Mlle")
     given-name (first name)
     additional-name
     family-name
     honorific-suffix: Suffix (e.g. "Jr.", "B.Sc.", "MBASW", "II")
     nickname
     email
     username
     new-password: A new password (e.g. when creating an account or changing a password)
     current-password
     organization-title: Job title (e.g. "Software Engineer", "Senior Vice President", "Deputy Managing Director")
     organization
     street-address
     address-line1, address-line2, address-line3, address-level4, address-level3, address-level2, address-level1
     country
     country-name
     postal-code
     cc-name: Full name as given on the payment instrument
     cc-given-name
     cc-additional-name
     cc-family-name
     cc-number: Code identifying the payment instrument (e.g. the credit card number)
     cc-exp: Expiration date of the payment instrument
     cc-exp-month
     cc-exp-year
     cc-csc: Security code for the payment instrument
     cc-type: Type of payment instrument (e.g. Visa)
     transaction-currency
     transaction-amount
     language: Preferred language; Valid BCP 47 language tag
     bday
     bday-day
     bday-month
     bday-year
     sex: Gender identity (e.g. Female, Fa'afafine); Free-form text, no newlines
     tel
     url: Home page or other Web page corresponding to the company, person, address, or contact information in the other fields associated with this field
     photo: Photograph, icon, or other image corresponding to the company, person, address, or contact information in the other fields associated with this field
     
    If the autocomplete attribute is not specified on an input element, then the browser uses the autocomplete attribute value of the <input> element's form owner. The form owner is either the form element that this <input> element is a descendant of, or the form element whose id is specified by the form attribute of the input element. For more information, see the autocomplete attribute in <form>. The autocomplete attribute also controls whether Firefox will, unlike other browsers, persist the dynamic disabled state and (if applicable) dynamic checkedness of an <input> across page loads. The persistence feature is enabled by default. Setting the value of the autocomplete attribute to off disables this feature; this works even when the autocomplete attribute would normally not apply to the <input> by virtue of its type. See bug 654072. For most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login (username and password) fields and, if they agree, from autofilling the login the next time the user visits the page. See The autocomplete attribute and login fields.
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • HONORIFIC_PREFIX

        public static final java.lang.String HONORIFIC_PREFIX
        Prefix or title (e.g. "Mr.", "Ms.", "Dr.", "Mlle").
        See Also:
        Constant Field Values
      • ADDITIONAL_NAME

        public static final java.lang.String ADDITIONAL_NAME
        Middle name
        See Also:
        Constant Field Values
      • FAMILY_NAME

        public static final java.lang.String FAMILY_NAME
        Last name
        See Also:
        Constant Field Values
      • HONORIFIC_SUFFIX

        public static final java.lang.String HONORIFIC_SUFFIX
        Suffix (e.g. "Jr.", "B.Sc.", "MBASW", "II").
        See Also:
        Constant Field Values
      • NEW_PASSWORD

        public static final java.lang.String NEW_PASSWORD
        A new password (e.g. when creating an account or changing a password).
        See Also:
        Constant Field Values
      • CURRENT_PASSWORD

        public static final java.lang.String CURRENT_PASSWORD
        See Also:
        Constant Field Values
      • ORGANIZATION_TITLE

        public static final java.lang.String ORGANIZATION_TITLE
        Job title (e.g. "Software Engineer", "Senior Vice President", "Deputy Managing Director").
        See Also:
        Constant Field Values
      • CC_NAME

        public static final java.lang.String CC_NAME
        Full name as given on the payment instrument.
        See Also:
        Constant Field Values
      • CC_ADDITIONAL_NAME

        public static final java.lang.String CC_ADDITIONAL_NAME
        See Also:
        Constant Field Values
      • CC_NUMBER

        public static final java.lang.String CC_NUMBER
        Code identifying the payment instrument (e.g. the credit card number).
        See Also:
        Constant Field Values
      • CC_EXP

        public static final java.lang.String CC_EXP
        Expiration date of the payment instrument.
        See Also:
        Constant Field Values
      • CC_CSC

        public static final java.lang.String CC_CSC
        Security code for the payment instrument.
        See Also:
        Constant Field Values
      • CC_TYPE

        public static final java.lang.String CC_TYPE
        Type of payment instrument (e.g. Visa).
        See Also:
        Constant Field Values
      • TRANSACTION_CURRENCY

        public static final java.lang.String TRANSACTION_CURRENCY
        See Also:
        Constant Field Values
      • TRANSACTION_AMOUNT

        public static final java.lang.String TRANSACTION_AMOUNT
        See Also:
        Constant Field Values
      • LANGUAGE

        public static final java.lang.String LANGUAGE
        Preferred language; a valid BCP 47 language tag.
        See Also:
        Constant Field Values
      • SEX

        public static final java.lang.String SEX
        Gender identity (e.g. Female, Fa'afafine), free-form text, no newlines.
        See Also:
        Constant Field Values
      • TEL

        public static final java.lang.String TEL
        full telephone number, including country code
        See Also:
        Constant Field Values
      • TEL_COUNTRY_CODE

        public static final java.lang.String TEL_COUNTRY_CODE
        See Also:
        Constant Field Values
      • TEL_LOCAL_PREFIX

        public static final java.lang.String TEL_LOCAL_PREFIX
        See Also:
        Constant Field Values
      • TEL_LOCAL_SUFFIX

        public static final java.lang.String TEL_LOCAL_SUFFIX
        See Also:
        Constant Field Values
      • URL

        public static final java.lang.String URL
        Home page or other Web page corresponding to the company, person, address, or contact information in the other fields associated with this field.
        See Also:
        Constant Field Values
      • PHOTO

        public static final java.lang.String PHOTO
        Photograph, icon, or other image corresponding to the company, person, address, or contact information in the other fields associated with this field.
        See Also:
        Constant Field Values
      • IMPP

        public static final java.lang.String IMPP
        URL representing an instant messaging protocol endpoint (for example, "aim:goim?screenname=example" or "xmpp:fred@example.net")
        See Also:
        Constant Field Values
      • HOME

        public static final java.lang.String HOME
        the field is for contacting someone at their residence
        See Also:
        Constant Field Values
      • WORK

        public static final java.lang.String WORK
        the field is for contacting someone at their workplace
        See Also:
        Constant Field Values
      • MOBILE

        public static final java.lang.String MOBILE
        the field is for contacting someone regardless of location
        See Also:
        Constant Field Values
      • FAX

        public static final java.lang.String FAX
        the field describes a fax machine's contact details
        See Also:
        Constant Field Values
      • PAGER

        public static final java.lang.String PAGER
        the field describes a pager's or beeper's contact details
        See Also:
        Constant Field Values
    • Constructor Detail

      • AutoComplete

        public AutoComplete​()
        Since:
        2.1.15
      • AutoComplete

        public AutoComplete​(java.lang.String value)
        Parameters:
        value - the value for the attribute. The value string can contain values separated by space.
        Since:
        1.0.0
      • AutoComplete

        public AutoComplete​(java.lang.String... values)
        Parameters:
        values - the value for the attribute. The value string can contain values separated by space.
        Since:
        2.1.15
    • Method Detail

      • removeValue

        public void removeValue​(java.lang.String value)
        removes the value
        Parameters:
        value -
        Since:
        2.1.15
      • removeValues

        public void removeValues​(java.util.Collection<java.lang.String> values)
        removes the values
        Parameters:
        values -
        Since:
        2.1.15
      • addValues

        public void addValues​(java.util.Collection<java.lang.String> values)
        adds the values to the last
        Parameters:
        values -
        Since:
        2.1.15
      • addValue

        public void addValue​(java.lang.String value)
        adds the value to the last
        Parameters:
        value -
        Since:
        2.1.15
      • setValue

        public void setValue​(java.lang.String value)
        sets the value for this attribute
        Parameters:
        value - the value for the attribute.
        Since:
        1.0.0
      • setValue

        public void setValue​(boolean updateClient,
                             java.lang.String attributeValue)
        sets the value for this attribute
        Parameters:
        updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
        attributeValue - the value for the attribute.
        Since:
        2.1.15
      • getValue

        public java.lang.String getValue​()
        gets the value of this attribute
        Returns:
        the value of the attribute
        Since:
        1.0.0
      • getValueSet

        public java.util.Set<java.lang.String> getValueSet​()
        Returns:
        a new copy of set of values
        Since:
        2.1.15
      • init

        protected void init​()
        invokes only once per object
        Since:
        1.0.0