noted. I think the 2nd piece of code is a valid workaround to me. i suppose the purpose of reverse lookup in the url mapping to avoid hardcoding. If I have a RESTful API that has POST and GET for two actions, I would expect to define the action in the form and let the "method" be generated and I don't need to hard code the method (which is duplicated in the urlmapping). So if I change the HTTP method in the UrlMapping, i don't need to make change to the forms. (i.e. for the same purpose of the url attribute.)
if it's too complex to implement, or you guys think it's no good to implement, I think it should be stated in the documentation.
ps is "however you should not specify the action when using restful requests" is a good practice or what? if it's just a design preference, then I think the implementation should give the flexibility to allow people to directly call the restful action. Take an example, I may use Grails to implement a restful API for an external application and also for a local Grails form to use. I would want to avoid hardcoding the HTTP method.
pps HTML form should support POST and GET only. this could be a reason to skip the HTTP method lookup. I personally would prefer to do lookup if an action is mapped to POST or GET, and leave the method blank (that default as GET) for other cases.