(Quick Reference)

withForm

目的
Purpose

Used to handle duplicate form submissions.

使用例
Examples

withForm {
   // good request
}.invalidToken {
   // bad request
}

詳細
Description

The withForm method requires the use of the useToken attribute in a form

<g:form useToken="true" ...>

Then in your controller code you can use the withForm method to handle valid and invalid requests:

withForm {
   // good request
}.invalidToken {
   // bad request
}

See Handling Duplicate Form Submissions for more information.