passwordField
passwordField is a masked input field for entering passwords.
XML Element |
|
|---|---|
Java Class |
|
Basics
The following example demonstrates basic passwordField functionality:
<passwordField id="passwordField" label="PasswordField"/>
The set of attributes for the passwordField component is similar to the attributes available for the textField component. However, there is no datatype attribute – the input for a passwordField can only be of type String.
Data-aware passwordField
Use the dataContainer and property attributes to bind passwordField to an entity attribute. The data container provides the entity instance, and property identifies the attribute to edit.
<data>
<instance id="productTagDc"
class="io.jmix.uisamples.entity.ProductTag"
fetchPlan="_local"/>
</data>
<passwordField id="passwordField" label="Field connected to a container" width="15em"
dataContainer="productTagDc" property="name"/>
Theme Variants
Use the themeNames attribute to apply one or more theme variants.
| Variant | Description | Supported By |
|---|---|---|
|
Makes the component smaller. |
Aura, Lumo |
|
Aligns the field value to the left side. |
Aura, Lumo |
|
Centers the field value. |
Aura, Lumo |
|
Aligns the field value to the right side. |
Aura, Lumo |
|
Renders the helper text above the field, below the label. |
Aura, Lumo |
Attributes
The following attributes are specific to passwordField:
| Name | Description | Default |
|---|---|---|
Controls whether text is selected automatically when the field receives focus. |
— |
|
Controls whether the field displays a clear button. |
|
|
Sets the component value. |
— |
The following shared attributes are supported by passwordField:
id - alignSelf - allowedCharPattern - ariaLabel - ariaLabelledBy - autocapitalize - autocomplete - autocorrect - autofocus - classNames - css - colspan - dataContainer - enabled - errorMessage - focusShortcut - height - helperText - label - maxHeight - maxWidth - minHeight - minWidth - pattern - placeholder - property - readOnly - required - requiredMessage - tabIndex - themeNames - title - valueChangeMode - valueChangeTimeout - visible - width
Handlers
The following handlers are specific to passwordField:
| Name | Description |
|---|---|
Validates the component value. |
The following shared handlers are supported by passwordField: