【问题标题】:Render password value using f:field in Grails在 Grails 中使用 f:field 呈现密码值
【发布时间】:2018-03-13 10:40:23
【问题描述】:

我正在使用 f:field 来呈现自定义 Cmd 对象。

class CustomCmd implements Validateable {

    String user
    String password

    static constraints = {
        user blank: false, email: true
        password blank: false, password:true
    }

}

然后在我的 gsp 页面中我使用

<fieldset class="form">
  <f:with bean="${cmd}">
    <f:field property="user"/>
    <f:field property="password"/>
  </f:with>
</fieldset>

密码未显示在页面上(带有标准****项目符号):该字段没有值,但用户字段填充了正确的值。

有没有办法使用 f:field 标签来填充密码字段?

【问题讨论】:

    标签: grails gsp


    【解决方案1】:

    这似乎是想要的行为: https://github.com/grails-fields-plugin/grails-fields/issues/60

    我不同意开发者的观点......顺便说一句,这不是错误

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多