【发布时间】:2015-08-13 09:51:44
【问题描述】:
我有一个在我的控制器中生成并传递到 GSP 页面的地图数组列表!
我想将地图的值作为列表显示在 g:select in gsp 中!
就像在arrayList中的每个元素(Map)中一样!选择选项值应该是映射值,映射键作为 optionKey 因为我想在用户选择选项时在脚本中使用此键!
对不起,如果问题不太清楚,我有点困惑!
ArrayList[Map1,Map2,Map3]
Map1[1,value1]
Map2[2,value2]
Map3[3,value3]
// the values are strings to show in select
//the respective key of the option value the user has chosen i want it as option key so i can pass it to script
【问题讨论】:
-
你能把你的示例代码做成人们可以使用的东西而不是伪代码吗?