我有一组stream
视频,它们具有district
它们所属的外键。但是,然后我单击edit
或delete
按钮,我得到了;
Error 2012-08-30 23:51:16,424 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver - MissingMethodException occurred when processing request: [GET] /ctv/stream/list
No signature of method: ctv.Stream.findAllByDistrict() is applicable for argument types: () values: []
Possible solutions: findAllByDistrict([Ljava.lang.Object;). Stacktrace follows:
Message: No signature of method: ctv.Stream.findAllByDistrict() is applicable for argument types: () values: []
Possible solutions: findAllByDistrict([Ljava.lang.Object;)
问题是因为
<g:form>
<g:hiddenField name="id" value="${streamInstance?.id}" />
<span class="button"><g:actionSubmit class="edit" action="edit" id="${params['district']}" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
<span class="button"><g:actionSubmit class="delete" action="delete" id="${params['district']}" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
</g:form>
我正在尝试将district
id 发送到edit
页面,但我无法做到。有人可以帮我吗?假设district=10
,那么我需要10
通过<g:actionSubmit>
标签传递值。我怎么能那样做?