Vaadin7 (7.4.0)密码字段掩码输入带有星号的提示文本,这不是预期的行为。有没有人有办法解决这个问题并在密码字段中显示文本?
发布于 2015-04-25 20:27:01
发布于 2015-12-13 20:01:54
为了详细说明raffael的答案,这是我在Vaadin 7中使用的:
PasswordField password = new PasswordField();
password.setID("PasswordID");
Page.getCurrent().getJavaScript().execute("document.getElementById('PasswordID').placeholder = 'Password';");如果您尝试使用setInputPrompt()函数,它将覆盖占位符(因为它被视为字段的值)。
希望能有所帮助。
发布于 2016-04-12 14:32:07
Hi use DOM add on vaadin 7
https://vaadin.com/directory#!addon/dom
Dom dom =新的Dom(this.passwordField);
Dom.setAttribute(“占位符”,“密码”);
https://stackoverflow.com/questions/29845930
复制相似问题