aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPasswordField.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java5
-rw-r--r--client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java34
-rw-r--r--client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java32
-rw-r--r--server/src/main/java/com/vaadin/ui/LoginForm.java14
-rw-r--r--server/src/main/java/com/vaadin/ui/PasswordField.java40
-rw-r--r--server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java123
-rw-r--r--themes/src/main/themes/VAADIN/themes/base/textfield/textfield.scss14
-rw-r--r--themes/src/main/themes/VAADIN/themes/chameleon/components/textfield/textfield.scss6
-rw-r--r--themes/src/main/themes/VAADIN/themes/reindeer/textfield/textfield.scss9
-rw-r--r--themes/src/main/themes/VAADIN/themes/runo/textfield/textfield.scss6
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/components/_textfield.scss6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionTabIds.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/passwordfield/PasswordFieldTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/LegacyGridElement.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/legacyelements/LegacyPasswordFieldElement.java9
27 files changed, 283 insertions, 102 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
index 9399b17f8d..d8c3b1f012 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
@@ -17,18 +17,19 @@
package com.vaadin.client.ui;
import com.google.gwt.user.client.DOM;
-import com.vaadin.client.v7.ui.VLegacyTextField;
/**
* This class represents a password field.
*
* @author Vaadin Ltd.
- *
*/
-public class VPasswordField extends VLegacyTextField {
+public class VPasswordField extends VTextField {
+
+ public static final String CLASSNAME = "v-passwordfield";
public VPasswordField() {
super(DOM.createInputPassword());
+ setStyleName(CLASSNAME);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
index 403ccc4193..c129c12c8f 100644
--- a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
@@ -13,16 +13,15 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-
package com.vaadin.client.ui.passwordfield;
import com.vaadin.client.ui.VPasswordField;
-import com.vaadin.client.v7.ui.textfield.LegacyTextFieldConnector;
+import com.vaadin.client.ui.textfield.TextFieldConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.ui.PasswordField;
@Connect(PasswordField.class)
-public class PasswordFieldConnector extends LegacyTextFieldConnector {
+public class PasswordFieldConnector extends TextFieldConnector {
@Override
public VPasswordField getWidget() {
diff --git a/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java b/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java
new file mode 100644
index 0000000000..ffc1422eb0
--- /dev/null
+++ b/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed 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 com.vaadin.client.v7.ui;
+
+import com.google.gwt.user.client.DOM;
+
+/**
+ * This class represents a password field.
+ *
+ * @author Vaadin Ltd.
+ *
+ */
+@Deprecated
+public class VLegacyPasswordField extends VLegacyTextField {
+
+ public VLegacyPasswordField() {
+ super(DOM.createInputPassword());
+ }
+
+}
diff --git a/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java
new file mode 100644
index 0000000000..1c3f89d693
--- /dev/null
+++ b/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed 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 com.vaadin.client.v7.ui.passwordfield;
+
+import com.vaadin.client.v7.ui.VLegacyPasswordField;
+import com.vaadin.client.v7.ui.textfield.LegacyTextFieldConnector;
+import com.vaadin.shared.ui.Connect;
+import com.vaadin.v7.ui.LegacyPasswordField;
+
+@Deprecated
+@Connect(LegacyPasswordField.class)
+public class LegacyPasswordFieldConnector extends LegacyTextFieldConnector {
+
+ @Override
+ public VLegacyPasswordField getWidget() {
+ return (VLegacyPasswordField) super.getWidget();
+ }
+}
diff --git a/server/src/main/java/com/vaadin/ui/LoginForm.java b/server/src/main/java/com/vaadin/ui/LoginForm.java
index f1270f98e9..0cd2b18cf9 100644
--- a/server/src/main/java/com/vaadin/ui/LoginForm.java
+++ b/server/src/main/java/com/vaadin/ui/LoginForm.java
@@ -33,7 +33,7 @@ import com.vaadin.v7.ui.LegacyTextField;
/**
* Login form with auto-completion and auto-fill for all major browsers. You can
* derive from this class and implement the
- * {@link #createContent(com.vaadin.v7.ui.LegacyTextField, com.vaadin.ui.PasswordField, com.vaadin.ui.Button)}
+ * {@link #createContent(com.vaadin.ui.TextField, com.vaadin.ui.PasswordField, com.vaadin.ui.Button)}
* method to build the layout using the text fields and login button that are
* passed to that method. The supplied components are specially treated so that
* they work with password managers.
@@ -41,7 +41,7 @@ import com.vaadin.v7.ui.LegacyTextField;
* If you need to change the URL as part of the login procedure, call
* {@link #setLoginMode(LoginMode)} with the argument {@link LoginMode#DEFERRED}
* in your implementation of
- * {@link #createContent(com.vaadin.v7.ui.LegacyTextField, com.vaadin.ui.PasswordField, com.vaadin.ui.Button)
+ * {@link #createContent(com.vaadin.ui.TextField, com.vaadin.ui.PasswordField, com.vaadin.ui.Button)
* createContent}.
* <p>
* To customize the fields or to replace them with your own implementations, you
@@ -141,9 +141,9 @@ public class LoginForm extends AbstractSingleComponentContainer {
* @return the user name field
* @since 7.7
*/
- protected LegacyTextField createUsernameField() {
+ protected TextField createUsernameField() {
checkInitialized();
- LegacyTextField field = new LegacyTextField(getUsernameCaption());
+ TextField field = new TextField(getUsernameCaption());
field.focus();
return field;
}
@@ -287,7 +287,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* @return content component
* @since 7.7
*/
- protected Component createContent(LegacyTextField userNameField,
+ protected Component createContent(TextField userNameField,
PasswordField passwordField, Button loginButton) {
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
@@ -327,8 +327,8 @@ public class LoginForm extends AbstractSingleComponentContainer {
getLoginButton()));
}
- private LegacyTextField getUsernameField() {
- return (LegacyTextField) getState().userNameFieldConnector;
+ private TextField getUsernameField() {
+ return (TextField) getState().userNameFieldConnector;
}
private PasswordField getPasswordField() {
diff --git a/server/src/main/java/com/vaadin/ui/PasswordField.java b/server/src/main/java/com/vaadin/ui/PasswordField.java
index de973a3fb4..9d07d2718a 100644
--- a/server/src/main/java/com/vaadin/ui/PasswordField.java
+++ b/server/src/main/java/com/vaadin/ui/PasswordField.java
@@ -13,21 +13,20 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
+
package com.vaadin.ui;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
-import com.vaadin.data.Property;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
-import com.vaadin.v7.ui.LegacyAbstractTextField;
/**
* A field that is used to enter secret text information like passwords. The
* entered text is not displayed on the screen.
*/
-public class PasswordField extends LegacyAbstractTextField {
+public class PasswordField extends AbstractTextField {
/**
* Constructs an empty PasswordField.
@@ -37,29 +36,6 @@ public class PasswordField extends LegacyAbstractTextField {
}
/**
- * Constructs a PasswordField with given property data source.
- *
- * @param dataSource
- * the property data source for the field
- */
- public PasswordField(Property dataSource) {
- setPropertyDataSource(dataSource);
- }
-
- /**
- * Constructs a PasswordField with given caption and property data source.
- *
- * @param caption
- * the caption for the field
- * @param dataSource
- * the property data source for the field
- */
- public PasswordField(String caption, Property dataSource) {
- this(dataSource);
- setCaption(caption);
- }
-
- /**
* Constructs a PasswordField with given value and caption.
*
* @param caption
@@ -94,8 +70,8 @@ public class PasswordField extends LegacyAbstractTextField {
super.readDesign(design, designContext);
Attributes attr = design.attributes();
if (attr.hasKey("value")) {
- setValue(DesignAttributeHandler.readAttribute("value", attr,
- String.class), false, true);
+ doSetValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class));
}
}
@@ -108,16 +84,10 @@ public class PasswordField extends LegacyAbstractTextField {
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- LegacyAbstractTextField def = (LegacyAbstractTextField) designContext
+ AbstractTextField def = (AbstractTextField) designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
DesignAttributeHandler.writeAttribute("value", attr, getValue(),
def.getValue(), String.class);
}
-
- @Override
- public void clear() {
- setValue("");
- }
-
}
diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java b/server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java
new file mode 100644
index 0000000000..35916959c8
--- /dev/null
+++ b/server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed 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 com.vaadin.v7.ui;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
+import com.vaadin.data.Property;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * A field that is used to enter secret text information like passwords. The
+ * entered text is not displayed on the screen.
+ */
+@Deprecated
+public class LegacyPasswordField extends LegacyAbstractTextField {
+
+ /**
+ * Constructs an empty PasswordField.
+ */
+ public LegacyPasswordField() {
+ setValue("");
+ }
+
+ /**
+ * Constructs a PasswordField with given property data source.
+ *
+ * @param dataSource
+ * the property data source for the field
+ */
+ public LegacyPasswordField(Property dataSource) {
+ setPropertyDataSource(dataSource);
+ }
+
+ /**
+ * Constructs a PasswordField with given caption and property data source.
+ *
+ * @param caption
+ * the caption for the field
+ * @param dataSource
+ * the property data source for the field
+ */
+ public LegacyPasswordField(String caption, Property dataSource) {
+ this(dataSource);
+ setCaption(caption);
+ }
+
+ /**
+ * Constructs a PasswordField with given value and caption.
+ *
+ * @param caption
+ * the caption for the field
+ * @param value
+ * the value for the field
+ */
+ public LegacyPasswordField(String caption, String value) {
+ setValue(value);
+ setCaption(caption);
+ }
+
+ /**
+ * Constructs a PasswordField with given caption.
+ *
+ * @param caption
+ * the caption for the field
+ */
+ public LegacyPasswordField(String caption) {
+ this();
+ setCaption(caption);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (attr.hasKey("value")) {
+ setValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class), false, true);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ LegacyAbstractTextField def = (LegacyAbstractTextField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("value", attr, getValue(),
+ def.getValue(), String.class);
+ }
+
+ @Override
+ public void clear() {
+ setValue("");
+ }
+
+}
diff --git a/themes/src/main/themes/VAADIN/themes/base/textfield/textfield.scss b/themes/src/main/themes/VAADIN/themes/base/textfield/textfield.scss
index 4266346132..1b0dd89228 100644
--- a/themes/src/main/themes/VAADIN/themes/base/textfield/textfield.scss
+++ b/themes/src/main/themes/VAADIN/themes/base/textfield/textfield.scss
@@ -13,7 +13,9 @@
.v-textarea-focus {
}
input.#{$primaryStyleName}-prompt,
-textarea.v-textarea-prompt {
+textarea.v-textarea-prompt,
+input[placeholder],
+textarea[placeholder] {
color: #999;
font-style: italic;
}
@@ -35,18 +37,18 @@ textarea.v-textarea-readonly:focus {
.v-textarea-error,
.#{$primaryStyleName}-error,
.v-richtextarea-error iframe.gwt-RichTextArea {
- background: #FFE0E0;
+ background: #FFE0E0;
}
*/
/* Disabled by default
.v-textarea-required,
.#{$primaryStyleName}-required,
.v-richtextarea-required iframe.gwt-RichTextArea {
- background: #FFE0E0;
+ background: #FFE0E0;
}
*/
/* Safari focus glow fix */
-.v-sa & input:focus,
+.v-sa & input:focus,
.v-sa & textarea:focus {
outline-width: medium;
}
@@ -106,7 +108,7 @@ textarea.v-textarea-readonly:focus {
}
.v-richtextarea .gwt-RichTextToolbar .gwt-ToggleButton img,
.v-richtextarea .gwt-RichTextToolbar .gwt-PushButton img {
-
+
}
.v-richtextarea .gwt-RichTextToolbar .gwt-ListBox {
width: 24.5%;
@@ -117,4 +119,4 @@ textarea.v-textarea-readonly:focus {
border: none;
}
-} \ No newline at end of file
+}
diff --git a/themes/src/main/themes/VAADIN/themes/chameleon/components/textfield/textfield.scss b/themes/src/main/themes/VAADIN/themes/chameleon/components/textfield/textfield.scss
index 4554672da4..46366b899d 100644
--- a/themes/src/main/themes/VAADIN/themes/chameleon/components/textfield/textfield.scss
+++ b/themes/src/main/themes/VAADIN/themes/chameleon/components/textfield/textfield.scss
@@ -48,7 +48,9 @@ input.v-widget.#{$primaryStyleName}[type="text"],
}
&.v-app input.#{$primaryStyleName}-prompt,
-&.v-app textarea.v-textarea-prompt {
+&.v-app textarea.v-textarea-prompt,
+&.v-app input[placeholder],
+&.v-app textarea[placeholder] {
font-style: normal;
color: #999;
}
@@ -128,4 +130,4 @@ input.#{$primaryStyleName}-search[type=text],
padding-left: 17px;
}
-} \ No newline at end of file
+}
diff --git a/themes/src/main/themes/VAADIN/themes/reindeer/textfield/textfield.scss b/themes/src/main/themes/VAADIN/themes/reindeer/textfield/textfield.scss
index 4bca7dbeb6..4ddb2054f1 100644
--- a/themes/src/main/themes/VAADIN/themes/reindeer/textfield/textfield.scss
+++ b/themes/src/main/themes/VAADIN/themes/reindeer/textfield/textfield.scss
@@ -54,7 +54,9 @@
background-color: #fff;
}
input.#{$primaryStyleName}-prompt,
-textarea.v-textarea-prompt {
+textarea.v-textarea-prompt,
+input[placeholder],
+textarea[placeholder] {
font-style: normal;
color: #999;
}
@@ -105,7 +107,8 @@ textarea.v-textarea-prompt {
border-bottom-color: #507596;
background-color: #151717;
}
-.black input.#{$primaryStyleName}-prompt {
+.black input.#{$primaryStyleName}-prompt,
+.black input[placeholder] {
color: #5f6366;
}
/* Readonly */
@@ -117,4 +120,4 @@ textarea.v-textarea-readonly,
background: transparent;
}
-} \ No newline at end of file
+}
diff --git a/themes/src/main/themes/VAADIN/themes/runo/textfield/textfield.scss b/themes/src/main/themes/VAADIN/themes/runo/textfield/textfield.scss
index 3516f529ce..505bc5d74b 100644
--- a/themes/src/main/themes/VAADIN/themes/runo/textfield/textfield.scss
+++ b/themes/src/main/themes/VAADIN/themes/runo/textfield/textfield.scss
@@ -25,7 +25,9 @@ textarea.v-textarea {
border-color: #5daee8;
}
input.#{$primaryStyleName}-prompt,
-textarea.v-textarea-prompt {
+input[placeholder],
+textarea.v-textarea-prompt,
+textarea[placeholder] {
color: #999;
font-style: normal;
}
@@ -46,4 +48,4 @@ textarea.v-textarea-small {
padding: 1px 2px;
}
-} \ No newline at end of file
+}
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_textfield.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_textfield.scss
index a460ba4ca8..517ed03dc2 100644
--- a/themes/src/main/themes/VAADIN/themes/valo/components/_textfield.scss
+++ b/themes/src/main/themes/VAADIN/themes/valo/components/_textfield.scss
@@ -211,7 +211,8 @@ $v-textfield-disabled-opacity: $v-disabled-opacity !default;
}
// TODO allow parent selector to be used in interpolation
- &[class*="prompt"] {
+ &[class*="prompt"],
+ &[placeholder] {
@include valo-textfield-prompt-style($background-color);
}
@@ -308,7 +309,8 @@ $v-textfield-disabled-opacity: $v-disabled-opacity !default;
@include box-shadow(none);
}
- &[class*="prompt"] {
+ &[class*="prompt"],
+ &[placeholder] {
@include valo-textfield-prompt-style($background-color);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java b/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
index 40f0e83287..1e09a083c2 100644
--- a/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
+++ b/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -21,15 +21,15 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Component.Event;
import com.vaadin.ui.Component.Listener;
-import com.vaadin.v7.ui.LegacyField;
-import com.vaadin.v7.ui.LegacyTextField;
import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Panel;
import com.vaadin.ui.PasswordField;
+import com.vaadin.ui.TextField;
import com.vaadin.ui.Tree;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.ui.LegacyField;
/**
* This example demonstrates custom layout. All components created here are
@@ -51,7 +51,7 @@ public class CustomLayoutDemo extends com.vaadin.server.LegacyApplication
private final Panel bodyPanel = new Panel();
- private final LegacyTextField username = new LegacyTextField("Username");
+ private final TextField username = new TextField("Username");
private final PasswordField loginPwd = new PasswordField("Password");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
index 2c70619f0a..779ce83ff0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
@@ -22,13 +22,13 @@ import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.v7.ui.LegacyTextField;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.ui.LegacyPasswordField;
+import com.vaadin.v7.ui.LegacyTextField;
public class AbsoluteLayoutHideComponent extends AbstractTestUI {
@@ -36,7 +36,7 @@ public class AbsoluteLayoutHideComponent extends AbstractTestUI {
private VerticalLayout topBar = new VerticalLayout();
private GridLayout menu;
private LegacyTextField editEmail = new LegacyTextField();
- private PasswordField editPassword = new PasswordField();
+ private LegacyPasswordField editPassword = new LegacyPasswordField();
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionTabIds.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionTabIds.java
index cceec3a178..a13485f511 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionTabIds.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionTabIds.java
@@ -17,7 +17,7 @@ public class AccordionTabIds extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
index 57a020c828..36bcf9ff43 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
@@ -19,7 +19,7 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.tests.util.PersonContainer;
import com.vaadin.ui.LegacyGrid;
-import com.vaadin.ui.PasswordField;
+import com.vaadin.v7.ui.LegacyPasswordField;
import com.vaadin.v7.ui.LegacyTextField;
public class GridEditorUI extends AbstractTestUI {
@@ -39,7 +39,7 @@ public class GridEditorUI extends AbstractTestUI {
grid.setEditorEnabled(true);
- grid.getColumn("firstName").setEditorField(new PasswordField());
+ grid.getColumn("firstName").setEditorField(new LegacyPasswordField());
LegacyTextField lastNameField = (LegacyTextField) grid
.getColumn("lastName").getEditorField();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/passwordfield/PasswordFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/passwordfield/PasswordFieldTest.java
index 2f75b9ed0d..36cb42390f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/passwordfield/PasswordFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/passwordfield/PasswordFieldTest.java
@@ -2,15 +2,15 @@ package com.vaadin.tests.components.passwordfield;
import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.tests.components.abstractfield.LegacyAbstractTextFieldTest;
-import com.vaadin.ui.PasswordField;
+import com.vaadin.v7.ui.LegacyPasswordField;
public class PasswordFieldTest
- extends LegacyAbstractTextFieldTest<PasswordField>
+ extends LegacyAbstractTextFieldTest<LegacyPasswordField>
implements TextChangeListener {
@Override
- protected Class<PasswordField> getTestClass() {
- return PasswordField.class;
+ protected Class<LegacyPasswordField> getTestClass() {
+ return LegacyPasswordField.class;
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
index 9b7bf457d9..30e6ceee12 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
@@ -6,6 +6,7 @@ import com.vaadin.ui.GridLayout;
import com.vaadin.ui.PasswordField;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.TextArea;
+import com.vaadin.ui.TextField;
import com.vaadin.ui.themes.ChameleonTheme;
import com.vaadin.ui.themes.Reindeer;
import com.vaadin.v7.ui.LegacyTextField;
@@ -45,7 +46,7 @@ public class TextFieldsCssTest extends GridLayout {
private void createTextFieldWith(String caption, String primaryStyleName,
String inputPrompt) {
- LegacyTextField tf = new LegacyTextField();
+ TextField tf = new TextField();
tf.setId("textfield" + debugIdCounter++);
if (caption != null) {
tf.setCaption(caption);
@@ -56,7 +57,7 @@ public class TextFieldsCssTest extends GridLayout {
}
if (inputPrompt != null) {
- tf.setInputPrompt(inputPrompt);
+ tf.setPlaceholder(inputPrompt);
}
addComponent(tf);
diff --git a/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java b/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
index 75a9b8977e..5b56c9bdd4 100644
--- a/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
+++ b/uitest/src/main/java/com/vaadin/tests/fields/TabIndexes.java
@@ -8,7 +8,6 @@ import com.vaadin.tests.components.AbstractTestUIWithLog;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.v7.ui.LegacyTextField;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Component;
@@ -18,7 +17,6 @@ import com.vaadin.ui.InlineDateField;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.PopupDateField;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.Slider;
@@ -27,6 +25,8 @@ import com.vaadin.ui.TextArea;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TreeTable;
import com.vaadin.ui.TwinColSelect;
+import com.vaadin.v7.ui.LegacyPasswordField;
+import com.vaadin.v7.ui.LegacyTextField;
@SuppressWarnings("rawtypes")
public class TabIndexes extends AbstractTestUIWithLog {
@@ -114,7 +114,7 @@ public class TabIndexes extends AbstractTestUIWithLog {
tree.addItem("Item 1");
fields.add(tree);
fields.add(new TwinColSelect());
- fields.add(new PasswordField());
+ fields.add(new LegacyPasswordField());
fields.add(new LegacyTextField());
fields.add(new TextArea());
fields.add(new RichTextArea());
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
index 053d4460d2..f60b700448 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
@@ -14,7 +14,6 @@ import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.v7.ui.LegacyTextField;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Component;
@@ -26,9 +25,10 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Layout;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.ui.LegacyPasswordField;
+import com.vaadin.v7.ui.LegacyTextField;
public class CaptionsInLayoutsWaiAria extends TestBase {
@@ -199,7 +199,7 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
components.add(new LegacyTextField("Default TextBox"));
components.add(new TextArea("Default TextArea."));
// components.add(new RichTextArea("Default RichtTextArea"));
- components.add(new PasswordField("Default Password"));
+ components.add(new LegacyPasswordField("Default Password"));
components.add(new DateField("Default DateField"));
// PopupDateField popupDateField = new
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
index ac2f1c3601..44d90d145e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
@@ -7,11 +7,11 @@ import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
import com.vaadin.v7.data.validator.LegacyAbstractValidator;
import com.vaadin.v7.data.validator.LegacyEmailValidator;
+import com.vaadin.v7.ui.LegacyPasswordField;
import com.vaadin.v7.ui.LegacyTextField;
public class SimpleLoginView extends CustomComponent
@@ -21,7 +21,7 @@ public class SimpleLoginView extends CustomComponent
private final LegacyTextField user;
- private final PasswordField password;
+ private final LegacyPasswordField password;
private final Button loginButton;
@@ -38,7 +38,7 @@ public class SimpleLoginView extends CustomComponent
user.setInvalidAllowed(false);
// Create the password input field
- password = new PasswordField("Password:");
+ password = new LegacyPasswordField("Password:");
password.setWidth("300px");
password.addValidator(new PasswordValidator());
password.setRequired(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
index b686cb9235..7d29c874cc 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
@@ -5,13 +5,13 @@ import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.v7.ui.LegacyTextField;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Panel;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.ui.LegacyPasswordField;
+import com.vaadin.v7.ui.LegacyTextField;
public class LoginView extends Panel implements View {
@@ -24,7 +24,8 @@ public class LoginView extends Panel implements View {
final LegacyTextField email = new LegacyTextField("Email");
layout.addComponent(email);
- final PasswordField password = new PasswordField("Password");
+ final LegacyPasswordField password = new LegacyPasswordField(
+ "Password");
layout.addComponent(password);
final Button login = new Button("Login", new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
index dbdb377cb8..33236adf6b 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
@@ -164,20 +164,20 @@ public class TextFields extends VerticalLayout implements View {
row.addComponent(tf);
PasswordField pwf = new PasswordField("Password");
- pwf.setInputPrompt("Secret words");
+ pwf.setPlaceholder("Secret words");
pwf.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
pwf.setIcon(FontAwesome.LOCK);
row.addComponent(pwf);
pwf = new PasswordField("Password, right-aligned");
- pwf.setInputPrompt("Secret words");
+ pwf.setPlaceholder("Secret words");
pwf.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
pwf.addStyleName(ValoTheme.TEXTFIELD_ALIGN_RIGHT);
pwf.setIcon(FontAwesome.LOCK);
row.addComponent(pwf);
pwf = new PasswordField("Password, centered");
- pwf.setInputPrompt("Secret words");
+ pwf.setPlaceholder("Secret words");
pwf.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
pwf.addStyleName(ValoTheme.TEXTFIELD_ALIGN_CENTER);
pwf.setIcon(FontAwesome.LOCK);
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
index e092a1bc68..d9ee350512 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
@@ -25,7 +25,6 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.NativeSelect;
-import com.vaadin.ui.PasswordField;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TwinColSelect;
@@ -34,6 +33,7 @@ import com.vaadin.v7.data.Validator;
import com.vaadin.v7.data.validator.LegacyStringLengthValidator;
import com.vaadin.v7.ui.LegacyAbstractField;
import com.vaadin.v7.ui.LegacyField;
+import com.vaadin.v7.ui.LegacyPasswordField;
import com.vaadin.v7.ui.LegacyTextField;
public class FieldErrorIndication extends AbstractTestUI {
@@ -88,7 +88,7 @@ public class FieldErrorIndication extends AbstractTestUI {
Class<? extends LegacyAbstractField>[] textFields = new Class[] {
LegacyTextField.class, TextArea.class, RichTextArea.class,
- PasswordField.class };
+ LegacyPasswordField.class };
vl = new VerticalLayout();
hl.addComponent(vl);
for (Class<? extends LegacyField> fieldClass : textFields) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
index 8f84d38fa9..4353ba7e01 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
@@ -29,8 +29,8 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.elements.NotificationElement;
-import com.vaadin.testbench.elements.PasswordFieldElement;
import com.vaadin.testbench.parallel.TestCategory;
+import com.vaadin.tests.legacyelements.LegacyPasswordFieldElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
@TestCategory("grid")
@@ -67,7 +67,7 @@ public class GridEditorUITest extends MultiBrowserTest {
@Test
public void testEditor() {
assertFalse("Sanity check",
- isElementPresent(PasswordFieldElement.class));
+ isElementPresent(LegacyPasswordFieldElement.class));
openEditor(5);
new Actions(getDriver()).sendKeys(Keys.ESCAPE).perform();
@@ -75,7 +75,7 @@ public class GridEditorUITest extends MultiBrowserTest {
openEditor(10);
assertTrue("Editor should be opened with a password field",
- isElementPresent(PasswordFieldElement.class));
+ isElementPresent(LegacyPasswordFieldElement.class));
assertFalse("Notification was present",
isElementPresent(NotificationElement.class));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/LegacyGridElement.java b/uitest/src/test/java/com/vaadin/tests/components/grid/LegacyGridElement.java
index 95b6a78635..907c02660d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/LegacyGridElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/LegacyGridElement.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed 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
diff --git a/uitest/src/test/java/com/vaadin/tests/legacyelements/LegacyPasswordFieldElement.java b/uitest/src/test/java/com/vaadin/tests/legacyelements/LegacyPasswordFieldElement.java
new file mode 100644
index 0000000000..e03747e359
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/legacyelements/LegacyPasswordFieldElement.java
@@ -0,0 +1,9 @@
+package com.vaadin.tests.legacyelements;
+
+import com.vaadin.testbench.elements.PasswordFieldElement;
+import com.vaadin.testbench.elementsbase.ServerClass;
+
+@ServerClass("com.vaadin.v7.ui.LegacyPasswordField")
+public class LegacyPasswordFieldElement extends PasswordFieldElement {
+
+}