Pergunta

maybe I am just asking google & co. the wrong questions but this is what I want to accomplish:

I have a GSP template with a nested template within. The outer one has access to the members of a domain class instance. Instead of passing all the domain member like

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

or using the iterator like

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

i would like to do simply use outer GSP's model in the inner one.

Am I missing something?

Greetings, smon

Foi útil?

Solução

To expose the entire model to a template for rendering use pageScope.variables such as:

<g:render template="/some/template" model="${pageScope.variables}"/>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top