Can I use grails tag outside of GSP?

前端 未结 4 865
忘了有多久
忘了有多久 2020-12-09 10:24

For example, i can put

  

inside a .gsp file and it will work nicely.

Bu

4条回答
  •  盖世英雄少女心
    2020-12-09 11:04

    You can use taglib methods from Grails controllers, for example:

    def userShow = g.createLink(controller:"user", action:"show")
    

    For builtin taglibs (or those in the g namespace) you can omit the namespace prefix in the method call.

提交回复
热议问题