-2

I have:

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

The result is:

Dashboard Hello

Alexander Suraphel
  • 10,103
  • 10
  • 55
  • 90
  • If you have controller and view, g:link should be correct. It is also correct even without controller. Could you provide more info? Maybe you have codec in config? – uladzimir Feb 24 '14 at 14:22
  • See the source code generated. Seek for errors in your console view. –  Feb 24 '14 at 22:02

2 Answers2

0

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.

mat.naute
  • 21
  • 4
0

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()
        }

    }
Community
  • 1
  • 1
Alexander Suraphel
  • 10,103
  • 10
  • 55
  • 90