Question

I have:

<td>
   <g:link controller="dashboard" action="view">Dashboard</g:link>
   <a href="fkd.co">Hello</a>
</td>

The result is:

Dashboard Hello

Was it helpful?

Solution 2

I just found out that <g:link> was overwritten and it was made only to create the links if the logged in user has access to that link otherwise emit the body text. The code looks like:

def link = { attrs, body ->

        def url = "/${pageScope.controllerName}/${attrs.action}"

        if( !securityService.isLoggedIn() ||
            securityService?.hasAccessToUri("/${pageScope.controllerName}/${attrs.action}") ) {

            def originalTagBean = grailsApplication.mainContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib')

            originalTagBean.link.call(attrs, body)
        } else {
            out << body()
        }

    }

OTHER TIPS

It's look like your gsp page has not been compiled at all. Check source in the web browser. You should run embedded server with run-app command and then access the page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top