views:

51

answers:

1

I need to pass a correct URL to a javascript function in one of my GSPs. I don't want to just hard code it just in case the mappings for that URL ever change.

I know in Rails I would use the url_for method such as:

<%= url_for :controller => 'something', :action => 'edit', :id => 3 %>

How would I do this in Grails? I can't seem to find a GSP tag or anything that would return a properly formatted URL given the controller, action, id, etc...

+2  A: 

Use createLink, see http://grails.org/doc/1.2/ref/Tags/createLink.html

Burt Beckwith
Thank you......
intargc