@Tag(value="vaadin-password-field") @NpmPackage(value="@vaadin/vaadin-text-field", version="2.10.0") @JsModule(value="@vaadin/vaadin-text-field/src/vaadin-password-field.js") public abstract class GeneratedVaadinPasswordField<R extends GeneratedVaadinPasswordField<R,T>,T> extends GeneratedVaadinTextField<R,T> implements HasStyle
Description copied from corresponding location in WebComponent:
<vaadin-password-field> is a Web Component for password field control
in forms.
<vaadin-password-field label="Password"> </vaadin-password-field>
See vaadin-text-field.html for the styling documentation
In addition to vaadin-text-field parts, here's the list of vaadin-password-field specific parts
| Part name | Description |
|---|---|
reveal-button |
The eye icon which toggles the password visibility |
In addition to vaadin-text-field state attributes, here's the list of vaadin-password-field specific attributes
| Attribute | Description | Part name |
|---|---|---|
password-visible |
Set when the password is visible | :host |
GeneratedVaadinTextField.ChangeEvent<R extends GeneratedVaadinTextField<R,?>>, GeneratedVaadinTextField.InvalidChangeEvent<R extends GeneratedVaadinTextField<R,?>>AbstractField.ComponentValueChangeEvent<C extends Component,V>BlurNotifier.BlurEvent<C extends Component>FocusNotifier.FocusEvent<C extends Component>HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>| Constructor and Description |
|---|
GeneratedVaadinPasswordField()
Default constructor.
|
GeneratedVaadinPasswordField(T initialValue,
T defaultValue,
boolean acceptNullValues)
Constructs a new GeneratedVaadinPasswordField component with the given
arguments.
|
GeneratedVaadinPasswordField(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
SerializableBiFunction<R,P,T> presentationToModel,
SerializableBiFunction<R,T,P> modelToPresentation)
Constructs a new GeneratedVaadinPasswordField component with the given
arguments.
|
GeneratedVaadinPasswordField(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
SerializableFunction<P,T> presentationToModel,
SerializableFunction<T,P> modelToPresentation)
Constructs a new GeneratedVaadinPasswordField component with the given
arguments.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isPasswordVisibleBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isRevealButtonHiddenBoolean()
Description copied from corresponding location in WebComponent:
|
protected void |
setRevealButtonHidden(boolean revealButtonHidden)
Description copied from corresponding location in WebComponent:
|
addChangeListener, addInvalidChangeListener, addThemeVariants, addToInput, addToPrefix, addToSuffix, checkValidity, getAutocapitalizeString, getAutocompleteString, getAutocorrectString, getErrorMessageString, getLabelString, getListString, getMaxlengthDouble, getMinlengthDouble, getNameString, getPatternString, getPlaceholderString, getTitleString, isAutofocusBoolean, isAutoselectBoolean, isClearButtonVisibleBoolean, isDisabledBoolean, isInvalidBoolean, isPreventInvalidInputBoolean, isReadonlyBoolean, isRequiredBoolean, remove, removeAll, removeThemeVariants, setAutocapitalize, setAutocomplete, setAutocorrect, setAutofocus, setAutoselect, setClearButtonVisible, setDisabled, setErrorMessage, setInvalid, setLabel, setList, setMaxlength, setMinlength, setName, setPattern, setPlaceholder, setPreventInvalidInput, setReadonly, setRequired, setTitle, validategetSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamegetElementaddFocusShortcut, blur, focus, getTabIndex, setTabIndexaddBlurListeneraddFocusListenerisEnabled, setEnabledaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameisReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisibleclear, getOptionalValueaddAttachListeneraddDetachListenerpublic GeneratedVaadinPasswordField(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableFunction<P,T> presentationToModel, SerializableFunction<T,P> modelToPresentation)
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that converts a string value to a model valuemodelToPresentation - a function that converts a model value to a string valuepublic GeneratedVaadinPasswordField(T initialValue, T defaultValue, boolean acceptNullValues)
initialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedacceptNullValues - whether null is accepted as a model valuepublic GeneratedVaadinPasswordField(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableBiFunction<R,P,T> presentationToModel, SerializableBiFunction<R,T,P> modelToPresentation)
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that accepts this component and a property value
and returns a model valuemodelToPresentation - a function that accepts this component and a model value and
returns a property valuepublic GeneratedVaadinPasswordField()
protected boolean isRevealButtonHiddenBoolean()
Description copied from corresponding location in WebComponent:
Set to true to hide the eye icon which toggles the password visibility.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
revealButtonHidden property from the webcomponentprotected void setRevealButtonHidden(boolean revealButtonHidden)
Description copied from corresponding location in WebComponent:
Set to true to hide the eye icon which toggles the password visibility.
revealButtonHidden - the boolean value to setprotected boolean isPasswordVisibleBoolean()
Description copied from corresponding location in WebComponent:
True if the password is visible ([type=text]).
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
passwordVisible property from the webcomponentCopyright © 2025. All rights reserved.