Reputation: 57212
I'm trying out the grails action submit button, and I have the following code
<g:form name="sample" controller="person">
<g:actionSubmit value="Submit me" action="Update"/>
</g:form>
While it is invoking the "Update" action, the url remains http://myapp/person/list
rather than actually showing the action being applied (in this case Update). This is confusing from an end user perspective. Is there a way to actually show the correct URL?
Upvotes: 2
Views: 3450
Reputation: 3407
This was actually reported as a bug (minor). I don't think it's a big deal not to show the correct url but I agree with you that, depending on the case, it can be confusing. But anyway, the last comment on the Jira issue describes a workaround that works. =) It's basically using:
<g:actionSubmit class="update" onclick="this.form.action='${createLink(action:'update')}';" value="Update" />
Here's the link for it.
Upvotes: 4