integer digit grouping in grails scaffolded views
I have a default scaffolded view and in the list view, all my integer values are shown with digit grouping. (like 5,129)
I couldn't find a way to disable this behavior. I tried on both English and Turkish locale. I am not sure if it is used but the messages.properties file is all default values:
default.date.format=yyyy-MM-dd HH:mm:ss z
default.number.format=0
If I change the view and add g:formatNumber around the value such as
<g:formatNum开发者_如何学JAVAber number="${fieldValue(bean: tagInstance, field: 'tag_id')}" type="number" groupingUsed="false" />
all that gets printed is 5 (for the number 5129)
Eliminating the fieldValue()
call fixed it.
${tagInstance.tag_id}
prints the number without any formatting.
Have you tried this:
default.number.format=#
Note that the #
will cause a value of 0
to not display. If you want it to display, you'll probably want:
default.number.format=#0
精彩评论