开发者

How to change order of input fields that Grails generates

When Grails generates a view (like create.gsp) it puts all the attributes of a class in alphabeti开发者_运维问答cal order. I would prefer the class attributes be listed in the order that I have them arranged in the class file. I can move them around manually, but I was wondering, is there was a way to make Grails arrange it the way I want automatically? I am using NetBeans if that makes a difference.


Whatever order they appear in the constraints block is how they will be generated. So with the least amount of config you might have

static constraints = {
  username()
  firstName()
  lastName()
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜