Grails

render()ing a template with a controller in a plugin fails

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: Plugins
  • Labels:
    None
  • Environment:
    Linux, Grails 1.0.1, JDK 1.6, JDK 1.5, Jetty (grails run-app)
  • Patch Submitted:
    Yes

Description

When render()ing a template from a controller in a plugin, the context path is not applied to the template URI and so the template can't be found.

Example:

MyController.groovy
class MyController {
   def myAction = {
      // ...
      render(template:'mytemplate', contextPath: pluginContextPath, [some: model])
   }
}

The provided patch corrects this issue. I had a look at how the render tag works and copied the relevant code to RenderDynamicMethod.

This issue depends on GRAILS-2487

Activity

Hide
Graeme Rocher added a comment -

Thanks for the patch

Show
Graeme Rocher added a comment - Thanks for the patch
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: