The default show template places an g:if test=”${domainInstance?.fieldName}” around each domain class field. The problem is that Boolean fields which have a ‘false’ value are not displayed on the page. What is the purpose of the g:if test?
The default show template places an g:if test=${domainInstance?.fieldName} around each domain class field. The
Share
I personally use the g:if option to check if a field is null to avoid null pointer exceptions. You are right though that for a Boolean field that is not null but has a value of false this would return false. I feels a bit like a “feature” of the scaffolding that grails does.