How to hide password fields from Grails scaffolding views?

﹥>﹥吖頭↗ 提交于 2019-12-02 09:33:06

One way to solve this is by using customized field rendering via the fields plugin:

  • Create a folder grails-app\views\_fields\user\password
  • Put two files in this folder: _displayWidget.gsp and _displayWrapper.gsp
  • Enter <g:each in="${0..value.length()}">&bull;</g:each> into both files

The password field will not vanish from index and show views, but at least you won't see it's value any longer, but a mask of bullet points instead. Create and edit view still use the password input widget according to the property constraint.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!