I was moving the rendering of errors to a template.
Normally this is included in a lot of pages:
<g:hasErrors bean="${accountInstance}">
<div class="errors">
<g:renderErrors bean="${accountInstance}" as="list" />
</div>
</g:hasErrors>
I created a template which would be called by
<g:render template="/errors" bean="${accountInstance}" />
The template looks like:
<g:hasErrors bean="${it}">
<div class="errors">
<g:renderErrors bean="${it}" as="list" />
</div>
</g:hasErrors>
The problem is that the errors are not displayed in case there are errors.
Note that the surrounding div is displayed which results in a empty red box....
When I revert back to the normal "inline" coding of hasErrors and renderErrors in my gsp the errors are displayed.
Am I doing something wrong here?