How to change the order of input fields that Grails generates

When Grails generates a view (e.g. create.gsp ), it puts all the class attributes in alphabetical order. I would prefer the class attributes to be listed in the order I ordered them in the class file. I can move them manually, but I was wondering if there is a way to get Grail to organize this the way I want to automatically? I use NetBeans if that matters.

+4
source share
1 answer

Whatever order they appear in the block of restrictions, how they will be generated. So with the least amount of settings you could

 static constraints = { username() firstName() lastName() } 
+7
source

All Articles