I am using grails and i have a basic form remote
<g:formRemote name="add" onSuccess="close();" onFailure="dispayErrors();\"
url="[controller: ctx, action: 'insert']" method="POST" class="add">
//Some inputs + submit button
</g:formRemote>
My question is what shoud the insert method return for so that onFailure is triggered?
Thanx
Change the controller action (temporarily I presume) to
If you’re using Grails 2.0 it is recommended to define your action as a method rather than a closure: