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

Component’s XML-name: passwordField.


The 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.

An example of the PasswordField:

<passwordField id="passwordField"
               caption="Secret password field"/>
private PasswordField passwordField;
private Notifications notifications;

protected void onShowPasswordBtnClick(Button.ClickEvent event) {
password field


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

  • The capsLockIndicator attribute allows you to set the id of a CapsLockIndicator component that should indicate Caps Lock state for this passwordField.