While I'm developing applications in Grails I always like to have good names for things I create. Controllers, domain objects, views... The only thing I couldn't find a good name for until now was application layout.
As you can imagine the names
main.gspseem like a perfect match for application-wide layouts. The problem with
main.gspis that it's already taken by the scaffolding mechanism and it's very unlikely that the whole application will be based on scaffolded views. The problem with
application.gsphowever is much more severe. Once you create this guy it'll apply to everything even if there's no layout specified. This also applies not only to views but to static resources as well! So before you go ahead and create the
application.gspfile be prepared to what's coming on to you.
But (as usual with Grails) there's hope :) You can rename the global catch-all name of the layout to use for everything in the
grails.sitemesh.default.layout = "none"
This way I've specified that the layout named
none.gspwill be used as the catch-all instead of
application.gspand so I can use the latter one for my evil purposes :)
I hope this will save someone the headache I've had trying to figure this out, especially with the selenium plugin or partial-renderings from actions (like the ones used in Ajah) that when married with the original
application.gsplooks just wrong all along.