Grails

Applying layout to template at Runtime in Grails Application

There are use cases where we render the template from our action and update some div in the page using ajax. The downside of this approach is when the user hits the url directly in browser address bar and the UI get totally messed up. So to fix this issue we need to apply the […]

Grails

Setting default layout in Grails application

Grails uses Sitemesh for adding layout to the views. Layouts are located in layouts folder and to add layouts to the view we generally add any of the following line in head [java] <g:applyLayout name="layoutName"/> or <meta name="layout" content="layoutName" /> [/java] But most of the time we have single layout, so why we repeat the […]