Techspace

IT happens only in IT

Null message in Grails

I had a domain object

class Project{
    String projectTitle
    Rso rso
}

Where Rso itself is another domain object.

Both projectTitle and rso could not be blank or null.
when I tried
project.projectTitle.blank message in messages.properties, it worked

but
project.rso.null was not working.
I was trying project.rso.null because the default message was mapped as default.null.message.

Then someone suggested me to use
project.rso.nullable and it worked.

August 18, 2009 Posted by | Grails, Groovy | , | Leave a Comment

   

Follow

Get every new post delivered to your Inbox.