Grails and gsp: How to render nested template with the same model/bean? -


maybe asking google & co. wrong questions want accomplish:

i have gsp template nested template within. outer 1 has access members of domain class instance. instead of passing domain member like

<g:render template="/image/alternativetemplate" model="${[member1: member1, member2: member2]}"/> 

or using iterator like

<g:render template="/image/alternativetemplate" model="${[it: it]}"/> 

i use outer gsp's model in inner one.

am missing something?

greetings, smon

to expose entire model template rendering use pagescope.variables such as:

<g:render template="/some/template" model="${pagescope.variables}"/> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -