Can I use grails tag outside of GSP?

前端 未结 4 863
忘了有多久
忘了有多久 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:26

    For unmanaged classes you can reference the g taglib with:

    def g = ApplicationHolder.application.mainContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib')
    

提交回复
热议问题