com.vaadin.flow.component.textfield.
Class GeneratedVaadinPasswordField<R extends GeneratedVaadinPasswordField<R,T>,T>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.AbstractField<C,T>
-
- com.vaadin.flow.component.AbstractSinglePropertyField<R,T>
-
- com.vaadin.flow.component.textfield.GeneratedVaadinTextField<R,T>
-
- com.vaadin.flow.component.textfield.GeneratedVaadinPasswordField<R,T>
-
All Implemented Interfaces:
AttachNotifier
,BlurNotifier<R>
,DetachNotifier
,Focusable<R>
,FocusNotifier<R>
,HasElement
,HasEnabled
,HasStyle
,HasTheme
,HasValue<AbstractField.ComponentValueChangeEvent<R,T>,T>
,HasValueAndElement<AbstractField.ComponentValueChangeEvent<R,T>,T>
,Serializable
Direct Known Subclasses:
@Tag("vaadin-password-field") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.1.15") @NpmPackage(value="@vaadin/password-field",version="23.1.15") @NpmPackage(value="@vaadin/vaadin-text-field",version="23.1.15") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/password-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>
Styling
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 See ThemableMixin ? how to apply styles for shadow parts
See Also:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.textfield.GeneratedVaadinTextField
GeneratedVaadinTextField.ChangeEvent<R extends GeneratedVaadinTextField<R,?>>, GeneratedVaadinTextField.InvalidChangeEvent<R extends GeneratedVaadinTextField<R,?>>
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
AbstractField.ComponentValueChangeEvent<C extends Component,V>
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
BlurNotifier.BlurEvent<C extends Component>
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
FocusNotifier.FocusEvent<C extends Component>
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>
-
-
Constructor Summary
Constructors Constructor Description GeneratedVaadinPasswordField()
Default constructor.
GeneratedVaadinPasswordField(T initialValue, T defaultValue, boolean acceptNullValues, boolean isInitialValueOptional)
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.
-
Method Summary
All Methods Modifier and Type Method 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:
-
Methods inherited from class com.vaadin.flow.component.textfield.GeneratedVaadinTextField
addChangeListener, addInvalidChangeListener, addThemeVariants, addToInput, addToPrefix, addToSuffix, checkValidity, getAutocapitalizeString, getAutocompleteString, getAutocorrectString, getErrorMessageString, getLabelString, getListString, getMaxlengthDouble, getMinlengthDouble, getNameString, getPatternString, getPlaceholderString, getTitleString, isAutofocusBoolean, isAutoselectBoolean, isDisabledBoolean, isInvalidBoolean, isPreventInvalidInputBoolean, isReadonlyBoolean, isRequiredBoolean, remove, removeAll, removeThemeVariants, setAutocapitalize, setAutocomplete, setAutocorrect, setAutofocus, setAutoselect, setDisabled, setErrorMessage, setInvalid, setLabel, setList, setMaxlength, setMinlength, setName, setPattern, setPlaceholder, setPreventInvalidInput, setReadonly, setRequired, setTitle, validate
-
Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent
-
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEquals
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
-
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
-
Methods inherited from interface com.vaadin.flow.component.HasValue
clear, getOptionalValue
-
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
-
-
-
-
Constructor Detail
-
GeneratedVaadinPasswordField
public 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.
Type Parameters:
P
- the property typeParameters:
initialValue
- 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 value
-
GeneratedVaadinPasswordField
public GeneratedVaadinPasswordField(T initialValue, T defaultValue, boolean acceptNullValues, boolean isInitialValueOptional)
Constructs a new GeneratedVaadinPasswordField component with the given arguments.
If
isInitialValueOptional
istrue
then the initial value is used only if element has no"value"
property value, otherwise element"value"
property is ignored and the initial value is set.Parameters:
initialValue
- the initial value to set to the valuedefaultValue
- the default value to use if the value isn't definedacceptNullValues
- whethernull
is accepted as a model valueisInitialValueOptional
- ifisInitialValueOptional
istrue
then the initial value is used only if element has no"value"
property value, otherwise element"value"
property is ignored and the initial value is set
-
GeneratedVaadinPasswordField
public 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.
Type Parameters:
P
- the property typeParameters:
initialValue
- 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 value
-
GeneratedVaadinPasswordField
public GeneratedVaadinPasswordField()
Default constructor.
-
-
Method Detail
-
isRevealButtonHiddenBoolean
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.
Returns:
the
revealButtonHidden
property from the webcomponent
-
setRevealButtonHidden
protected void setRevealButtonHidden(boolean revealButtonHidden)
Description copied from corresponding location in WebComponent:
Set to true to hide the eye icon which toggles the password visibility.
Parameters:
revealButtonHidden
- the boolean value to set
-
isPasswordVisibleBoolean
protected 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.
Returns:
the
passwordVisible
property from the webcomponent
-
-