Hi, I tried to bind data to a template created using GroovyPagesTemplateEngine, but cannot. Here is what I can as far I can go. Could some one help? Thanks!
import org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine
import org.springframework.core.io.FileSystemResource
File myfile = new File("c:\\myTools\\mydata.gsp")
def engine = new GroovyPagesTemplateEngine()
def data = ['data':'test']
def template = engine.createTemplate(new FileSystemResource(myfile))
I tried template.make(data), but does not work.....