Reputation: 9296
I'm trying to render template from controller but I got {}. If I tried to render a text or HTML directly I got it rendered. I use the following code to render template:
render(template:'/visit/registration')
I'm not sure if package name could cause the problem. My controller is inside PackageName.Visit package and my views is inside visit folder directly inside view folder. I'm using Grails 2.2
Upvotes: 0
Views: 316
Reputation: 35864
If you're controller is VisitController, then you're render would look like
render template: 'registration'
Assuming you have grails-app/views/visit/_registration.gsp
. If it is not really a template (_ denotes template), then you're render would be:
render view: 'registration'
If you're action is called registration, you don't need to explicitly call render.
Upvotes: 1