【发布时间】:2016-07-09 17:07:02
【问题描述】:
我有一个列表视图,对于每一行,我想要一个指向另一个列表视图的链接,以显示相关结果。我终于设法构建的 createlink 行如下所示
<a href="${createLink(controller : 'RunResults', action:'ListSpecific', params:'[id:testExecQueueInstance.id]')}">my link</a>
这会生成链接
http://localhost:3278/FARTFramework/runResults/listSpecific/testExecQueueInstance.id
我知道 testExecQueueInstance.id 是 22,我希望链接看起来像这样
http://localhost:3278/FARTFramework/runResults/listSpecific/22
我错过了什么?
我的想法是,然后我有一个像这样的控制器,然后应该列出与该 id 匹配的那些项目...
def ListSpecific(int id){
render(view: "list", model: [runResultsInstanceList: RunResults.findAllByTestExeQueueID(id, [sort:"testExecTime", order: "desc"]), runResultsInstanceTotal: RunResults.count()])
}
【问题讨论】: