The view/layouts/main.gsp contains the following body tag
<body ${pageProperty(name:'body.style',writeEntireProperty:'true')}>
and the views/classname/list.gsp body is created as
<body style="text-align:center;">
which results in the following runtime exception
No such property: propertyName for class: org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib
groovy.lang.MissingPropertyException: No such property: propertyName for class: org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib
at C_mygrails_grails_app_views_layouts_main_gsp.run(C_mygrails_grails_app_views_layouts_main_gsp:27)
Problem appears to be in the pageProperty closure of RenderTagLib where propertyName is used before being defined. This worked for me:
def pageProperty = { attrs ->
if(!attrs.name) {
throwTagError("Tag [pageProperty] is missing required attribute [name]")
}
String propertyName = attrs.name
def htmlPage = getPage()
String propertyValue = htmlPage.getProperty(attrs.name)
if (!propertyValue)
propertyValue = attrs.'default';
if (propertyValue) {
if (attrs.writeEntireProperty) {
out << ' '
out << propertyName.substring(propertyName.lastIndexOf('.') + 1)
out << "=\"${propertyValue}\""
}
else {
out << propertyValue
}
}
}
As a workaround I might also change the main.gsp to read
<body style="${pageProperty(name:'body.style')}">
Also the documentation for the pageProperty tag (http://docs.codehaus.org/display/GRAILS/GSP+Tag+-+pageProperty
) does not mention the writeEntireProperty attr at all. See http://www.opensymphony.com/sitemesh/tags.html#decorator:getProperty