I have a basic controller, just like this:
class BookingController {
def periodCheck(){
}
def periodInput(){
}
Both booking/periodCheck.gsp and booking/periodInput.gsp have been created, and they work if I access typing the URL directly.
However, I have a form in periodInput.gsp that is supposed to send some data to periodCheck, and every time, when I send the form, I get a 404 error, saying that The requested resource (/hoteledison/booking/periodCheck) is not available. The form is defined like this:
<g:form action="periodCheck">
<!-- here would go the fields -->
<g:actionSubmit class="btn" value="Comprobar" />
</g:form>
What am I doing wrong? I’ve also tried defining allowedMethods in the controller, but that does not help.
Ok, according to this blog post, there’s a difference between using
actionSubmitandsubmitButton. For forms like mine, with just one action, I should have used the later.Now it’s working.