You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by gundakiran <gu...@gmail.com> on 2008/01/17 06:26:12 UTC

Struts2 - disabling the formatting

I am using Struts2.0.8. By default tags like <s:text..> , <s:checkbox
fieldValue=${questionId} /> etc.. giving the value with commas (Ex: 2456 is
displaying as 2,456). I don't want comma to be displayed. One way is to
specify the format in .properties file and set the format such a way that
comma doesn't appear. But I want to disable this behavior in entire site.
Any Idea on how I can disable this feature so that I get the numbers without
any commas?

Thanks
Kiran
-- 
View this message in context: http://www.nabble.com/Struts2---disabling-the-formatting-tp14911010p14911010.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 - disabling the formatting

Posted by Laurie Harper <la...@holoweb.net>.
gundakiran wrote:
> I am using Struts2.0.8. By default tags like <s:text..> , <s:checkbox
> fieldValue=${questionId} /> etc.. giving the value with commas (Ex: 2456 is
> displaying as 2,456). I don't want comma to be displayed. One way is to
> specify the format in .properties file and set the format such a way that
> comma doesn't appear. But I want to disable this behavior in entire site.
> Any Idea on how I can disable this feature so that I get the numbers without
> any commas?

I'm not sure where the commas are coming from, but my guess is that it's 
either from the conversion to strings from whatever underlying type 
you're using, or from something 'clever' the templates are telling 
Freemarker to do.

I would start by looking at the templates for the theme you are using to 
see if they're doing any explicit formatting (see the Themes and 
Templates documentation [1] to get started). If that proves not to be 
it, experiment with customizing the output conversions (see the 
converters documentation [2] for more on that).

[1] http://struts.apache.org/2.x/docs/themes-and-templates.html
[2] http://struts.apache.org/2.x/docs/type-conversion.html

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org