开发者

Removing commas from Grails' Scaffolds for Longs

开发者 https://www.devze.com 2023-01-16 12:40 出处:网络
I\'m completely new to grails and I\'m trying to deploy some simple applicat开发者_StackOverflowions using grails\' scaffolding. I have a field in a domain class that stores barcodes as Longs. The def

I'm completely new to grails and I'm trying to deploy some simple applicat开发者_StackOverflowions using grails' scaffolding. I have a field in a domain class that stores barcodes as Longs. The default display in Grails' scaffolding is to display these Longs with commas separating every third numeral (e.g. 1,234,567). My searching of the documentation is getting me nowhere, is there a way of easily turning off this formatting until I can get a proper layout set up.

Thanks.


After generation of the scaffolded controllers and gsp files you could use the gsp tag g:formatNumber (see http://www.grails.org/GSP+Tag+-+formatNumber?xhr=true).

Maybe you can also customise the templates used for generation see docs for "grails install-templates" (http://www.grails.org/Artifact+and+Scaffolding+Templates) and get it working for dynamic scaffolding also... ymmv.

('tis my first post, be gentle)

0

精彩评论

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

关注公众号