Grails数据绑定-带映射的命令对象

Grails数据绑定-带映射的命令对象,grails,object,command,Grails,Object,Command,Grails2.0.3 我在将数据绑定到命令对象时遇到问题。我有这样的jquery请求 http://localhost:8080/api/test.json?callback=jQuery17102313091890902648_1334273415631&ex[0][a]=a0&ex[0][b]=b0&ex[1][a]=a1&ex[1][b]=b1 我需要一种将数据从请求url绑定到命令对象的方法。像这样的 class TestCommand { List<Map<Str

Grails2.0.3 我在将数据绑定到命令对象时遇到问题。我有这样的jquery请求 http://localhost:8080/api/test.json?callback=jQuery17102313091890902648_1334273415631&ex[0][a]=a0&ex[0][b]=b0&ex[1][a]=a1&ex[1][b]=b1

我需要一种将数据从请求url绑定到命令对象的方法。像这样的

class TestCommand
{
    List<Map<String, String>> ex
    static constraints = {}
}
类TestCommand
{
列名
静态约束={}
}
我想动态绑定数据,这样我就可以得到ex[0].a=a0和ex[0].b=b0,并直接在控制器中使用它。这对列表很有效。但是,不适用于地图列表。有没有办法像这样绑定数据

您尝试过使用吗

class TestCommand
{
    List<Map<String, String>> ex
    static constraints = {}
}
毕竟,无论您如何提出请求(通过使用jQuery或传统的GET方法),问题都是在服务器端解决的