5.5.2.1.25. PasswordField

This is a text field that displays echo characters instead of those entered by a user.

XML name of the component: passwordField.

PasswordField is implemented for Web Client and Desktop Client.

Basically, PasswordField is similar to TextField apart from the ability to set datatype. PasswordField is intended to work with text and entity attributes of type String only.

Example:

<passwordField id="passwordField" caption="msg://name"/>
<button caption="msg://buttonsName" invoke="showPassword"/>
@Inject
private PasswordField passwordField;

public void showPassword(){
    showNotification((String) passwordField.getValue(), NotificationType.HUMANIZED);
}
gui PasswordField

The autocomplete attribute allows you to enable saving passwords in the web browser. It is disabled by default.