use of com.vaadin.flow.component.textfield.PasswordField in project flow-components by vaadin.
the class ValueChangeModePage method initView.
private void initView() {
message = new Div();
message.setId("message");
add(message);
Stream.of(new TextField(), new TextArea(), new PasswordField(), new NumberField(), new EmailField(), new IntegerField(), new BigDecimalField()).forEach(this::setupTestComponent);
}
use of com.vaadin.flow.component.textfield.PasswordField in project flow-components by vaadin.
the class PasswordFieldTest method clearButtonVisiblePropertyValue.
@Test
public void clearButtonVisiblePropertyValue() {
PasswordField passwordField = new PasswordField();
assertClearButtonPropertyValueEquals(passwordField, true);
assertClearButtonPropertyValueEquals(passwordField, false);
}
use of com.vaadin.flow.component.textfield.PasswordField in project flow-components by vaadin.
the class PasswordFieldTest method initialValuePropertyValue.
@Test
public void initialValuePropertyValue() {
PasswordField passwordField = new PasswordField();
assertEquals(passwordField.getEmptyValue(), passwordField.getElement().getProperty("value"));
}
use of com.vaadin.flow.component.textfield.PasswordField in project flow-components by vaadin.
the class PasswordFieldTest method setValueNull.
@Test
public void setValueNull() {
PasswordField passwordField = new PasswordField();
assertEquals("Value should be an empty string", "", passwordField.getValue());
thrown.expect(NullPointerException.class);
thrown.expectMessage("Null value is not supported");
passwordField.setValue(null);
}
use of com.vaadin.flow.component.textfield.PasswordField in project SODevelopment by syampillai.
the class ChangePassword method createPasswordField.
private PasswordField createPasswordField(String caption) {
PasswordField f = new PasswordField(caption);
f.setMaxLength(30);
return f;
}
Aggregations