Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails: how to use createLink in a Filter?

Tags:

filter

grails

Short question:

How can I use createLink in a Filter?

I'm getting error:

No signature of method: MyFilters.createLink() is applicable for argument types...

My code is

createLink(controller:'home')

This code works inside a Controller, but not in a Filter.

like image 783
Topera Avatar asked May 27 '11 13:05

Topera


1 Answers

SOLVED!

import org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib
...
new ApplicationTagLib().createLink([controller: 'home'])
like image 112
Topera Avatar answered Sep 28 '22 19:09

Topera