Details
Description
I have been struggling with these for a few hours now, and have come to the
conclusion that it may be a bug with the 2.0.0.RC1.
At first I thought it was the project I was working on, but then I created a
complete new project and was able to recreate the bug. Am using grails
2.0.0.RC1.
The bug presents itself when I try to include a model object in a GSP, for
example:
<p>This data is coming from the model:</p>
<p>content: ${content}</p>
<g:include model="${otherModel}" view="/hello/include.gsp" />
Now in my action I have something like:
package helloworld
class HelloController {
def index() {
def model = [:]
model.content = 'content...'
def includeModel = [:]
includeModel.content = 'includeModel...'
model.otherModel = includeModel
render( view:'index', model:model )
}
}
The /hello/include.gsp file contains the following:
<p>This data is coming from the included model:</p>
<p>content: ${content}</p>
But, what shows up on the page is not what I am expecting, this is what
shows on the page:
– http://localhost:8080/helloworld/hello/index
This data is coming from the model:
content: content...
This data is coming from the included model:
content: content...
–
Any ideas?Any help is greatly appreciated.
Thanks,
-Cesar
I am reformatting some of the code in the original description as it is hard to evaluate otherwise.