【问题标题】:how to list all aws regions in grails如何列出grails中的所有aws区域
【发布时间】:2017-02-16 13:51:45
【问题描述】:

我必须通过提供多选选项在select 框中列出所有aws regions。 我添加了以下插件

compile "org.grails.plugins:multi-select:0.2"

create.gsp 文件中添加了以下标签

 <ui:multiSelect name="regions"
                    from="${}"
                    data-validation-error-msg="Please select one"
                    data-validation-error-msg-container="#multi_error"
                    noSelection="['':'Select One']"></ui:multiSelect>

如何显示所有区域,我必须为from 属性提供什么值。

并且选定的值应存储在Database 中的单个column 中,用逗号(,)分隔

【问题讨论】:

    标签: amazon-web-services grails


    【解决方案1】:

    我解决了这个问题,

    <ui:multiSelect name="regions"
                    from="${com.amazonaws.regions.Regions}"
                    data-validation-error-msg="Please select one"
                    data-validation-error-msg-container="#multi_error"
                    noSelection="['':'Select One']"></ui:multiSelect>
    

    使用了这个 Got 列表,但无法选择多个值。这么用了

    <g:select name="region"  multiple="multiple" from="${com.amazonaws.regions.Regions}"  />
    

    这个以列表的形式获取选定的值,并以逗号分隔直接将值存储在 DB 中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-16
      • 2018-12-17
      • 1970-01-01
      • 1970-01-01
      • 2018-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多