0

I am struggling to understand the scope of resources defined with the Grails resources plugin.

I have created a small project (Grails 2.0.4) with a single domain item of Book and generated the associated Controller and Views.

I have then modified the main layout as follows:

<html>
 <head>
  <g:layoutTitle/>
  <r:layoutResources/>
 </head>
 <body>
  <g:layoutBody/>
  <r:layoutResources/>
 </body>
</html>

When I run the app I get no styling as expected.

I now add the following to the head list.gsp

<head>
  <meta name="layout" content="main"/>
  <r:require modules="jquery-mobile"/>
</head> 

When I go to the list page now I correctly get the jquery-mobile styling as expected but when I go to the create page I also get jquery-mobile styling but was expecting no styling, as this page does not contain the tag.

It seems that the resources selected for one page are being used for all other pages. Is this expected behaviour?

Thanks, Kim

kimbad
  • 1

1 Answers1

0

Use Resources 1.2, it sounds like this might be an old bug.

Marc Palmer
  • 507
  • 2
  • 9