【问题标题】:using <g:select> grails使用 <g:select> grails
【发布时间】:2012-05-03 00:17:01
【问题描述】:

我正在使用 a 来显示个人资料名称列表。

<g:select name="ProfileSelector" from='${ProfileList?.profileName}' id='ProfileSelect' noSelection="['null':' SELECT VT']" disabled="true" />

所以配置文件列表是具有配置文件名称、配置文件ID、配置文件描述的配置文件类型。在提交时,我只能访问在控制器中选择为参数的 profileName。有什么方法可以将相应 profileName 的 profileId 作为参数传递。

【问题讨论】:

    标签: grails gsp grails-2.0 grails-controller


    【解决方案1】:

    是的,通过使用 optionKey 和 optionValue 参数。请查看http://grails.org/doc/2.0.x/ref/Tags/select.html 了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-13
      • 2012-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-14
      • 1970-01-01
      相关资源
      最近更新 更多