0

I have one domain class which has one numeric field. Default scaffolding generated it. When I enter a number with more than 3 digits, ex:- 1234, then in show.gsp and list.gsp it shows as 1,234. My requirement is to show the number without comma. I can't use g:formatNumber because I have more than 50 domains and not able to use this tag for every gsp page. Is there anything I can do to change the number pattern globally?

thanks

Tiago Farias
  • 3,397
  • 1
  • 27
  • 30
A B
  • 1,926
  • 1
  • 20
  • 42

2 Answers2

0

maybe solution suggested here can be useful

Community
  • 1
  • 1
Aram Arabyan
  • 2,339
  • 1
  • 17
  • 30
0

Get the field directly like:

<td valign="top" class="value">${formulationTypeInstance?.id}</td>

Of course you may lose some of the tag's features with it, like highlighting field when a validation error occurs. But you're in show.gsp and it shouldn't have text fields or something to submit, so you lose nothing! Simple is the way to go here. =)

Tiago Farias
  • 3,397
  • 1
  • 27
  • 30