Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0.2
-
Fix Version/s: None
-
Component/s: TagLib, URL mappings
-
Labels:None
Description
For simple URL mapping, such as
"/test/action"(controller: "test", action="action"){}
The form tag url could correct translate the link to /test/action
However, when the URL mapping contains different action for different HTTP method, the form tag url attribute doesn't translate the url and http method correctly. e.g. For the following mapping:
"/test/action"(controller: "test") { action = [GET: "action1", POST: "action2"] }
In the following form:
<g:form name="myform" url="[action:'action1',controller:'test']"> <g:submitButton name="Submit" value="action1"/> </g:form>
i expect it should translate to:
<form action="/test/action" method="get">
but it is now translated to :
<form action="/test/action1">
Issue Links
- is depended upon by
-
GRAILS-2844
Redirect doesn't work when URL Mapping with HTTP Method is used
-
- is related to
-
GRAILS-8945
Support reverse lookup of REST URL mappings
-
- relates to
-
GRAILS-8945
Support reverse lookup of REST URL mappings
-
-
GRAILS-9326
default controller name not applied, custom mapping in URLMappings applied
-
-
GRAILS-5207
Reverse URL mappings / redirect to REST url mapping fails
-
-
GRAILS-4588
reverse URL mapping breaks in controllers with alternate REST mappings
-
I don't understand what the issue is here. Yes I see that when you specify the action it translates the link incorrectly, however you should not specify the action when using restful requests. A form definition like:
will work fine, and if you need to change the action you go to you modify the HTTP method as follows: