Posted By

callmeblessed on 01/02/09


Tagged

template render groovy grails gsp


Versions (?)

Grails: render template as String


 / Published in: Groovy
 

URL: www.wysmedia.com

how to render GSP template as String ? g:render is taglib in gsp ( ) but you can call it on your controller using g.render().

  1. class MyController {
  2. def test = {
  3. def x = g.render(template:"/basecontroller/test",model:[name:"wysmedia.com"]); // stored as string ...
  4. render(x); // display the template instead render
  5. }
  6. }

Report this snippet  

You need to login to post a comment.