Quantcast

Render to string

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Render to string

oliverw
Hi

Does anyone know a safe way of rendering the content of a whole page with the layout correctly applied to a string?

This is what I had working prior to 1.2 but this seems to be broken now (the layout is not applied):

String content = g.render(template:"/question/show", model: computeShowQuestionModel(question))

- Oliver
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Re[grails-user] nder to string

msmyers
Do a HTTP post to your controller. Use groovyx for posting.

-----Original Message-----
From: oliverw [mailto:[hidden email]]
Sent: Tuesday, January 19, 2010 2:52 PM
To: [hidden email]
Subject: [grails-user] Re[grails-user] nder to string


Hi

Does anyone know a safe way of rendering the content of a whole page with
the layout correctly applied to a string?

This is what I had working prior to 1.2 but this seems to be broken now (the
layout is not applied):

String content = g.render(template:"/question/show", model:
computeShowQuestionModel(question))

- Oliver
--
View this message in context: http://old.nabble.com/Render-to-string-tp27234156p27234156.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Re[grails-user] nder to string

oliverw
I would call this a desperate measure. There must be an easier way that works reliably.

msmyers wrote
Do a HTTP post to your controller. Use groovyx for posting.

-----Original Message-----
From: oliverw [mailto:oliver@weichhold.com]
Sent: Tuesday, January 19, 2010 2:52 PM
To: user@grails.codehaus.org
Subject: [grails-user] Re[grails-user] nder to string


Hi

Does anyone know a safe way of rendering the content of a whole page with
the layout correctly applied to a string?

This is what I had working prior to 1.2 but this seems to be broken now (the
layout is not applied):

String content = g.render(template:"/question/show", model:
computeShowQuestionModel(question))

- Oliver
--
View this message in context: http://old.nabble.com/Render-to-string-tp27234156p27234156.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Loading...