Repository: wicket
Updated Branches:
  refs/heads/master 43b8e60b6 -> 7e1724da9


Revert "WICKET-6299"

This reverts commit bcd55813b3afbccb5675096930aee6281c5cba3a.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7e1724da
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7e1724da
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7e1724da

Branch: refs/heads/master
Commit: 7e1724da9da8a609e81b3e240f83c60dc8ebd80b
Parents: 43b8e60
Author: Tobias Soloschenko <[email protected]>
Authored: Wed Dec 21 17:30:40 2016 +0100
Committer: Tobias Soloschenko <[email protected]>
Committed: Wed Dec 21 17:30:40 2016 +0100

----------------------------------------------------------------------
 .../html/form/AutoCompleteAddressType.java      |  56 ----
 .../markup/html/form/AutoCompleteBuilder.java   | 170 ------------
 .../markup/html/form/AutoCompleteContact.java   |  77 ------
 .../html/form/AutoCompleteContactBuilder.java   |  38 ---
 .../html/form/AutoCompleteContactDetails.java   | 102 -------
 .../markup/html/form/AutoCompleteFields.java    | 272 -------------------
 .../apache/wicket/markup/html/form/Form.java    |  14 -
 .../wicket/markup/html/form/TextField.java      |  14 -
 .../wicket/markup/html/form/FormTest.java       |  39 ---
 .../wicket/markup/html/form/TextFieldTest.java  |  23 +-
 10 files changed, 2 insertions(+), 803 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteAddressType.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteAddressType.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteAddressType.java
deleted file mode 100644
index 6123053..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteAddressType.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * Auto completion address type according to the whatwg specification.
- * 
- * @author Tobias Soloschenko
- *
- * @see <a href=
- *      
"https://html.spec.whatwg.org/multipage/forms.html";>https://html.spec.whatwg.org/multipage/forms.html</a>
- * 
- */
-public enum AutoCompleteAddressType {
-
-       /**
-        * Meaning the field is part of the shipping address or contact 
information
-        */
-       SHIPPING("shipping"),
-
-       /**
-        * meaning the field is part of the billing address or contact 
information
-        */
-       BILLING("billing");
-
-       private String value;
-
-       private AutoCompleteAddressType(String value)
-       {
-               this.value = value;
-       }
-
-       /**
-        * Gets the address type value
-        * 
-        * @return the value of the address type
-        */
-       public String getValue()
-       {
-               return value;
-       }
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteBuilder.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteBuilder.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteBuilder.java
deleted file mode 100644
index a3b64cd..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteBuilder.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * The auto complete builder is used to build the corresponding attribute for 
form and input tags.
- * To use the auto completion just open the autofill options within your 
browser. In chrome for
- * example it is accessed with the following URL:
- * <a 
href="chrome://settings/autofillEditAddress">chrome://settings/autofillEditAddress</a>
- * 
- * @author Tobias Soloschenko
- * 
- * @since 8.0.0
- *
- */
-public class AutoCompleteBuilder implements AutoCompleteContactBuilder
-{
-       /**
-        * The section prefix specificed by the whatwg standard
-        */
-       public static final String SECTION_PREFIX = "section-";
-
-       private String sectionName;
-
-       private AutoCompleteAddressType addressType;
-
-       private AutoCompleteFields field;
-
-       private AutoCompleteContact contact;
-
-       private AutoCompleteContactDetails contactDetail;
-
-       private boolean empty;
-
-       /**
-        * Initializes a new auto complete builder
-        * 
-        * @return the auto complete builder
-        */
-       public static AutoCompleteBuilder init()
-       {
-               return new AutoCompleteBuilder();
-       }
-
-       /**
-        * Empties out the autocomplete outcome
-        * 
-        * @return the auto complete builder
-        */
-       public AutoCompleteBuilder empty()
-       {
-               this.empty = true;
-               return this;
-       }
-
-       /**
-        * Applies a section to the auto completion field
-        * 
-        * @param sectionName
-        *            the name of the section
-        * @return the auto complete builder itself
-        */
-       public AutoCompleteBuilder withSection(String sectionName)
-       {
-               this.sectionName = sectionName;
-               return this;
-       }
-
-       /**
-        * Assigns the auto completion to a specific address type
-        * 
-        * @param addressType
-        *            the auto completion address type
-        * @return the auto complete builder itself
-        */
-       public AutoCompleteBuilder forAddressType(AutoCompleteAddressType 
addressType)
-       {
-               this.addressType = addressType;
-               return this;
-       }
-
-       /**
-        * Applies the field to the autocomplete attribute
-        * 
-        * @param field
-        *            the field
-        * @return the auto complete builder
-        */
-       public AutoCompleteBuilder forField(AutoCompleteFields field)
-       {
-               this.field = field;
-               return this;
-       }
-
-       /**
-        * Applies the contact information to the autocomplete attribute
-        * 
-        * @param contact
-        *            the contact information are going to be applied to
-        * @return the auto complete builder
-        */
-       public AutoCompleteContactBuilder forContact(AutoCompleteContact 
contact)
-       {
-               this.contact = contact;
-               return this;
-       }
-
-       /**
-        * @see {@link AutoCompleteContactBuilder}
-        */
-       @Override
-       public AutoCompleteContactBuilder forField(AutoCompleteContactDetails 
contactDetail)
-       {
-               this.contactDetail = contactDetail;
-               return (AutoCompleteContactBuilder)this;
-       }
-
-       /**
-        * Builds the attribute string
-        * 
-        * @return the attribute content in the right order
-        */
-       @Override
-       public String toString()
-       {
-               StringBuilder stringBuilder = new StringBuilder();
-               if (!empty)
-               {
-                       if (sectionName != null)
-                       {
-                               stringBuilder.append(SECTION_PREFIX);
-                               stringBuilder.append(sectionName);
-                               stringBuilder.append(" ");
-                       }
-                       if (addressType != null)
-                       {
-                               stringBuilder.append(addressType.getValue());
-                               stringBuilder.append(" ");
-                       }
-                       if (field != null)
-                       {
-                               stringBuilder.append(field.getValue());
-                       }
-                       else
-                       {
-                               if (contact != null)
-                               {
-                                       
stringBuilder.append(contact.getValue());
-                                       stringBuilder.append(" ");
-                               }
-                               stringBuilder.append(contactDetail.getValue());
-                       }
-               }
-               return stringBuilder.toString();
-       }
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContact.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContact.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContact.java
deleted file mode 100644
index cbf86a5..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContact.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * Auto completion contact according to the whatwg specification.
- * 
- * @author Tobias Soloschenko
- *
- * @see <a href=
- *      
"https://html.spec.whatwg.org/multipage/forms.html";>https://html.spec.whatwg.org/multipage/forms.html</a>
- * 
- */
-public enum AutoCompleteContact {
-
-       /**
-        * meaning the field is for contacting someone at their residence
-        */
-       HOME("home"),
-
-       /**
-        * meaning the field is for contacting someone at their workplace
-        */
-       WORK("work"),
-
-       /**
-        * meaning the field is for contacting someone regardless of location
-        */
-       MOBILE("mobile"),
-
-       /**
-        * meaning the field describes a fax machine's contact details
-        */
-       FAX("fax"),
-
-       /**
-        * meaning the field describes a pager's or beeper's contact details
-        */
-       PAGER("pager");
-
-       private String value;
-
-       /**
-        * Creates an auto completion contact with the given value
-        * 
-        * @param value
-        *            the value of the contact
-        */
-       private AutoCompleteContact(String value)
-       {
-               this.value = value;
-       }
-
-       /**
-        * Gets the value of the auto completion contact
-        * 
-        * @return the value of the auto completion contact
-        */
-       public String getValue()
-       {
-               return value;
-       }
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactBuilder.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactBuilder.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactBuilder.java
deleted file mode 100644
index 07324ff..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactBuilder.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * The auto complete contact builder shrinks down the possibilities to the 
contact details
- * 
- * @author Tobias Soloschenko
- * 
- * @since 8.0.0
- *
- */
-public interface AutoCompleteContactBuilder
-{
-       /**
-        * Applies the contact details information to the auto complete field
-        * 
-        * @param contactDetail
-        *            the contact detail
-        * @return the auto complete builder contact
-        */
-       AutoCompleteContactBuilder forField(AutoCompleteContactDetails 
contactDetail);
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactDetails.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactDetails.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactDetails.java
deleted file mode 100644
index e4d5e44..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteContactDetails.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * Auto completion contact detail according to the whatwg specification.
- * 
- * @author Tobias Soloschenko
- *
- * @see <a href=
- *      
"https://html.spec.whatwg.org/multipage/forms.html";>https://html.spec.whatwg.org/multipage/forms.html</a>
- * 
- */
-public enum AutoCompleteContactDetails {
-
-       /**
-        * +1 617 253 5702
-        */
-       TEL("tel"),
-
-       /**
-        * +1
-        */
-       TEL_COUNTRY_CODE("tel-country-code"),
-
-       /**
-        * 617 253 5702
-        */
-       TEL_NATIONAL("tel-national"),
-
-       /**
-        * 617
-        */
-       TEL_AREA_CODE("tel-area-code"),
-
-       /**
-        * 2535702
-        */
-       TEL_LOCAL("tel-local"),
-
-       /**
-        * 253
-        */
-       TEL_LOCAL_PREFIX("tel-local-prefix"),
-
-       /**
-        * 5702
-        */
-       TEL_LOCAL_SUFFIX("tel-local-suffix"),
-
-       /**
-        * 1000
-        */
-       TEL_EXTENSION("tel-extension"),
-
-       /**
-        * [email protected]
-        */
-       EMAIL("email"),
-
-       /**
-        * irc://example.org/timbl,isuser
-        */
-       IMPP("impp");
-       
-       private String value;
-       
-       /**
-        * Creates an auto completion contact detail with the given value
-        * 
-        * @param value
-        *            the value of the contact detail
-        */
-       private AutoCompleteContactDetails(String value)
-       {
-               this.value = value;
-       }
-
-       /**
-        * Gets the value of the auto completion contact detail
-        * 
-        * @return the value of the auto completion contact detail
-        */
-       public String getValue()
-       {
-               return value;
-       }
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteFields.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteFields.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteFields.java
deleted file mode 100644
index 8f794c4..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoCompleteFields.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form;
-
-/**
- * Auto completion personal data according to the whatwg specification.
- * 
- * @author Tobias Soloschenko
- *
- * @see <a href=
- *      
"https://html.spec.whatwg.org/multipage/forms.html";>https://html.spec.whatwg.org/multipage/forms.html</a>
- * 
- */
-public enum AutoCompleteFields {
-
-       /**
-        * Simply turns on the auto completion
-        */
-       ON("on"),
-
-       /**
-        * Simply turns off the auto completion
-        */
-       OFF("off"),
-
-       /**
-        * Sir Timothy John Berners-Lee, OM, KBE, FRS, FREng, FRSA
-        */
-       NAME("name"),
-
-       /**
-        * Sir
-        */
-       HONORIFIC_PREFIX("honorific-prefix"),
-
-       /**
-        * Timothy
-        */
-       GIVEN_NAME("given-name"),
-
-       /**
-        * John
-        */
-       ADDITIONAL_NAME("additional-name"),
-
-       /**
-        * Berners-Lee
-        */
-       FAMILY_NAME("family-name"),
-
-       /**
-        * OM, KBE, FRS, FREng, FRSA
-        */
-       HONORIFIC_SUFFIX("honorific-suffix"),
-
-       /**
-        * Tim
-        */
-       NICKNAME("nickname"),
-
-       /**
-        * timbl
-        */
-       USERNAME("username"),
-
-       /**
-        * GUMFXbadyrS3
-        */
-       NEW_PASSWORD("new-password"),
-
-       /**
-        * qwerty
-        */
-       CURRENT_PASSWORD("current-password"),
-
-       /**
-        * Professor
-        */
-       ORGANIZATION_TITLE("organization-title"),
-
-       /**
-        * World Wide Web Consortium
-        */
-       ORGANIZATION("organization"),
-
-       /**
-        * Multiple lines 32 Vassar Street MIT Room 32-G524
-        */
-       STREET_ADDRESS("street-address"),
-
-       /**
-        * 32 Vassar Street
-        */
-       ADDRESS_LINE1("address-line1"),
-
-       /**
-        * MIT Room 32-G524
-        */
-       ADDRESS_LINE2("address-line2"),
-
-       /**
-        * See {@link AutoComplete.ADRESS_LINE2}
-        */
-       ADDRESS_LINE3("address-line3"),
-
-       /**
-        * The most fine-grained administrative level, in addresses with four 
administrative levels
-        */
-       ADDRESS_LEVEL4("address-level4"),
-
-       /**
-        * The third administrative level, in addresses with three or more 
administrative levels
-        */
-       ADDRESS_LEVEL3("address-level3"),
-
-       /**
-        * Cambridge
-        */
-       ADDRESS_LEVEL2("address-level2"),
-
-       /**
-        * MA
-        */
-       ADDRESS_LEVEL1("address-level1"),
-
-       /**
-        * US
-        */
-       COUNTRY("country"),
-
-       /**
-        * US
-        */
-       COUNTRY_NAME("country-name"),
-
-       /**
-        * 02139
-        */
-       POSTAL_CODE("postal-code"),
-
-       /**
-        * Tim Berners-Lee
-        */
-       CC_NAME("cc-name"),
-
-       /**
-        * Tim
-        */
-       CC_GIVEN_NAME("cc-given-name"),
-
-       /**
-        * -
-        */
-       CC_ADDITIONAL_NAME("cc-additional-name"),
-
-       /**
-        * Berners-Lee
-        */
-       CC_FAMILY_NAME("cc-family-name"),
-
-       /**
-        * 4114360123456785
-        */
-       CC_NUMBER("cc-number"),
-
-       /**
-        * 2014-12
-        */
-       CC_EXP("cc-exp"),
-
-       /**
-        * 12
-        */
-       CC_EXP_MONTH("cc-exp-month"),
-
-       /**
-        * 2014
-        */
-       CC_EXP_YEAR("cc-exp-year"),
-
-       /**
-        * 419
-        */
-       CC_CSC("cc-csc"),
-
-       /**
-        * Visa
-        */
-       CC_TYPE("cc-type"),
-
-       /**
-        * GBP
-        */
-       TRANSACTION_CURRENCY("transaction-currency"),
-
-       /**
-        * 401.00
-        */
-       TRANSACTION_AMOUNT("transaction-amount"),
-
-       /**
-        * en
-        */
-       LANGUAGE("language"),
-
-       /**
-        * 1955-06-08
-        */
-       BDAY("bday"),
-
-       /**
-        * 8
-        */
-       BDAY_DAY("bday-day"),
-
-       /**
-        * 6
-        */
-       BDAY_MONTH("bday-month"),
-
-       /**
-        * 1955
-        */
-       BDAY_YEAR("bday-year"),
-
-       /**
-        * Male
-        */
-       SEX("sex"),
-
-       /**
-        * https://www.w3.org/People/Berners-Lee/
-        */
-       URL("url"),
-
-       /**
-        * https://www.w3.org/Press/Stock/Berners-Lee/2001-europaeum-eighth.jpg
-        */
-       PHOTO("photo");
-
-       private String value;
-
-       private AutoCompleteFields(String value)
-       {
-               this.value = value;
-       }
-
-       /**
-        * Gets the value of the auto completion
-        * 
-        * @return the value of the auto completion
-        */
-       public String getValue()
-       {
-               return value;
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 1d3284a..e8b61e7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -1352,14 +1352,6 @@ public class Form<T> extends WebMarkupContainer
        }
 
        /**
-        * Gets the value of the autocomplete attribute. The default behavior 
is that it is turned off
-        * @return AutoCompleteBuilder the builder to generate the autocomplete 
attribute information
-        */
-       protected AutoCompleteBuilder getAutoCompleteBuilder(){
-               return AutoCompleteBuilder.init().empty();
-       }
-
-       /**
         * 
         * @see org.apache.wicket.Component#getStatelessHint()
         */
@@ -1641,12 +1633,6 @@ public class Form<T> extends WebMarkupContainer
                                        setMultiPart(true);
                                }
                        }
-
-                       // Auto completion support
-                       String autocompleteValue = 
getAutoCompleteBuilder().toString();
-                       if(!autocompleteValue.isEmpty()){
-                               tag.put("autocomplete", autocompleteValue);
-                       }
                }
                else
                {

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
index 719560c..81dc828 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/TextField.java
@@ -107,12 +107,6 @@ public class TextField<T> extends AbstractTextComponent<T>
 
                tag.put("value", getValue());
 
-               // Auto completion support
-               String autocompleteValue = getAutoCompleteBuilder().toString();
-               if(!autocompleteValue.isEmpty()){
-                       tag.put("autocomplete", autocompleteValue);
-               }
-
                // Default handling for component tag
                super.onComponentTag(tag);
        }
@@ -127,12 +121,4 @@ public class TextField<T> extends AbstractTextComponent<T>
        {
                return null;
        }
-
-       /**
-        * Gets the value of the autocomplete attribute. The default behavior 
is that it is turned off
-        * @return AutoCompleteBuilder the builder to generate the autocomplete 
attribute information
-        */
-       protected AutoCompleteBuilder getAutoCompleteBuilder(){
-               return AutoCompleteBuilder.init().empty();
-       }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/test/java/org/apache/wicket/markup/html/form/FormTest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/FormTest.java 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/FormTest.java
index 2ee420a..05344a5 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/FormTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/FormTest.java
@@ -53,39 +53,6 @@ public class FormTest extends WicketTestCase
                };
        }
 
-       /**
-        * Test auto complete functionality
-        */
-       @Test
-       public void testAutoComplete(){
-               class TestPage extends WebPage implements 
IMarkupResourceStreamProvider
-               {
-                       boolean shouldFail, submit, error;
-
-                       public TestPage()
-                       {
-                               add(new Form<Void>("form")
-                               {
-                                       @Override
-                                       protected AutoCompleteBuilder 
getAutoCompleteBuilder()
-                                       {
-                                               return 
AutoCompleteBuilder.init().forAddressType(AutoCompleteAddressType.BILLING).forField(AutoCompleteFields.GIVEN_NAME);
-                                       }
-                               });
-                       }
-
-                       @Override
-                       public IResourceStream getMarkupResourceStream(final 
MarkupContainer container,
-                               Class<?> containerClass)
-                       {
-                               return new StringResourceStream("<form 
wicket:id='form'></form>");
-                       }
-               }
-               
-               TestPage testPage = new TestPage();
-               tester.startPage(testPage);
-               
assertTrue(tester.getLastResponseAsString().contains("autocomplete=\"billing 
given-name\""));
-       }
 
        /**
         * @throws Exception
@@ -148,12 +115,6 @@ public class FormTest extends WicketTestCase
                                        {
                                                error = true;
                                        }
-                                       
-                                       @Override
-                                       protected AutoCompleteBuilder 
getAutoCompleteBuilder()
-                                       {
-                                               return 
AutoCompleteBuilder.init().forAddressType(AutoCompleteAddressType.BILLING).forField(AutoCompleteFields.GIVEN_NAME);
-                                       }
                                });
                        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/7e1724da/wicket-core/src/test/java/org/apache/wicket/markup/html/form/TextFieldTest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/TextFieldTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/TextFieldTest.java
index 2c215e5..5af5917 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/TextFieldTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/TextFieldTest.java
@@ -36,20 +36,7 @@ import org.junit.Test;
  */
 public class TextFieldTest extends WicketTestCase
 {
-       
-       /**
-        * Test auto complete feature
-        */
-       @Test
-       public void testAutoComplete(){
-               TestPage testPage = new TestPage();
-               tester.startPage(testPage);
-               
assertTrue(tester.getLastResponseAsString().contains("autocomplete=\"section-blue
 billing name\""));
-       }
-
-       /** 
-        * Test that inputs are converted to null 
-        * */
+       /** */
        @Test
        public void emptyInputConvertedToNull()
        {
@@ -124,13 +111,7 @@ public class TextFieldTest extends WicketTestCase
                public TestPage()
                {
                        add(form = new Form<>("form"));
-                       form.add(textField = new TextField<String>("text", 
textModel){
-                               @Override
-                               protected AutoCompleteBuilder 
getAutoCompleteBuilder()
-                               {
-                                       return 
AutoCompleteBuilder.init().withSection("blue").forAddressType(AutoCompleteAddressType.BILLING).forField(AutoCompleteFields.NAME);
-                               }
-                       });
+                       form.add(textField = new TextField<>("text", 
textModel));
                }
 
                @Override

Reply via email to