Tuesday, March 18, 2008

The inList conatraint must follow blank constraint

I found an interesting thing,that is if you set the property of Grails's Domain class with a constratint--inList,like this:

priority(inList:["High","Low"])

then,when you open the page to edit or create this domain,you will find that the property can't be select by a HTML select box.So,you must follow another constraint blank and set it false.like this:

priority(inList:["High","Low"],blank:false)

Is it a bug?

No comments: