【发布时间】:2015-06-15 19:32:52
【问题描述】:
g:actionSubmit按钮被点击时如何将参数进行转发?
这是我的gsp 代码:
<g:checkBox name="msgCheck" checked="" value="${userInstance.emailId}"></g:checkBox>
...
<g:actionSubmit class="update" action="delete" value="Delete" params="${params}"></g:actionSubmit>
这是我的控制器代码:
def delete() {
try {
def user_list = params.msgCheck
//deleting the user
//successful.
redirect(action: "list", params: params)
} catch (Exception e) {
log.error("Deleted Exception---->>" + e.getMessage())
}
}
params 缺少重定向。我想在redirect 上发扬params。
我点击“删除”g:actionSubmit 按钮之前的 URL 如下所示:
http://localhost:8080/message/list?offset=10&max=100
点击“删除”g:actionSubmit 按钮后,url 看起来像(并且有额外的参数:
http://localhost:8080/message/list?msgCheck=ga12%40user.com&msgCheck=&_action_domainDelete=Delete&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&_msgCheck=&domainId=1&noofrows=100
g:actionSubmit按钮被点击时,如何将参数结转?
【问题讨论】: