tags:

views:

151

answers:

1

In the following code, can I expect that the values in the "vars" will be accessible in the layer "Main"?

Blockquote

vars['tabs']= 'some tab code'
def text = g.applyLayout(name: "main", template: '/zones/preview_base', model: vars)

Blockquote

In the file main.gsp I want to reference <%=tab%>

But I always get nothing.

A: 

Have a look at this question. If I understand you correct this is the same problem:

http://stackoverflow.com/questions/503279/accessing-the-model-from-a-layout-view-in-grails

Joel S
This is not the same problem. I was able to isolate with a sample app that there is a bug. The behavior of g.applyLayout is different than when the layout is automatically applied in the controller. I submitted a complete working example of the bug to codehaus and haven't heard back.
Andrew