【发布时间】:2015-11-16 01:09:57
【问题描述】:
我正在使用 grails 2.4.2。我有一个表单,我可以在其中添加、编辑或删除任何数据或行。但是我想从索引中按需删除一行。为此,我在表格单元格中为每一行添加了一个链接。但它给出了错误号 405,即The specified HTTP method is not allowed for the requested resource。谁能帮我解决这个问题?以下是我的索引页:
我的 index.gsp >>>
<table>
<thead>
<tr>
<g:sortableColumn property="address" title="${message(code: 'userInfo.address.label', default: 'Address')}" />
<g:sortableColumn property="name" title="${message(code: 'userInfo.name.label', default: 'Name')}" />
<g:sortableColumn property="name" title="${message(code: 'userInfo.name.label', default: 'Action')}" />
</tr>
</thead>
<tbody>
<g:each in="${userInfoInstanceList}" status="i" var="userInfoInstance">
<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
<td><g:link action="show" id="${userInfoInstance.id}">${fieldValue(bean: userInfoInstance, field: "address")}</g:link></td>
<td>${fieldValue(bean: userInfoInstance, field: "name")}</td>
<td><g:link action="delete" id="${userInfoInstance.id}">Delete</g:link></td>
</tr>
</g:each>
</tbody>
</table>
【问题讨论】:
标签: grails grails-2.0