From 099b49882f051cd7da729714c33b8086d2b413e3 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Thu, 4 Oct 2018 21:53:58 +0400 Subject: [PATCH] Support inputPrompt for PasswordField #1332 --- .../haulmont/cuba/gui/components/PasswordField.java | 2 +- .../gui/src/com/haulmont/cuba/gui/screen/layout.xsd | 1 + .../gui/xml/layout/loaders/PasswordFieldLoader.java | 1 + .../cuba/web/gui/components/WebPasswordField.java | 10 ++++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/PasswordField.java b/modules/gui/src/com/haulmont/cuba/gui/components/PasswordField.java index e62e17dc54..1eef483da4 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/components/PasswordField.java +++ b/modules/gui/src/com/haulmont/cuba/gui/components/PasswordField.java @@ -17,7 +17,7 @@ package com.haulmont.cuba.gui.components; -public interface PasswordField extends TextInputField, TextInputField.MaxLengthLimited { +public interface PasswordField extends TextInputField, TextInputField.MaxLengthLimited, HasInputPrompt { String NAME = "passwordField"; diff --git a/modules/gui/src/com/haulmont/cuba/gui/screen/layout.xsd b/modules/gui/src/com/haulmont/cuba/gui/screen/layout.xsd index badbb7a7a4..09cc425a14 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/screen/layout.xsd +++ b/modules/gui/src/com/haulmont/cuba/gui/screen/layout.xsd @@ -1424,6 +1424,7 @@ + diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/PasswordFieldLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/PasswordFieldLoader.java index e758e0c2f9..b23afc8a25 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/PasswordFieldLoader.java +++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/PasswordFieldLoader.java @@ -34,6 +34,7 @@ public class PasswordFieldLoader extends AbstractTextFieldLoader super.loadComponent(); loadMaxLength(resultComponent, element); + loadInputPrompt(resultComponent, element); String autocomplete = element.attributeValue("autocomplete"); if (StringUtils.isNotEmpty(autocomplete)) { diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebPasswordField.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebPasswordField.java index 755e947ee6..34e44302d0 100644 --- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebPasswordField.java +++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebPasswordField.java @@ -143,4 +143,14 @@ public class WebPasswordField extends WebV8AbstractField