You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bruce Atherton <br...@callenish.com> on 2005/06/02 00:55:26 UTC

Getting a comma in my numbers

I'm using Cocoon forms, and every time I have a number in a field it is 
coming back formatted with commas embedded in the number. This also 
means that the numbers are being truncated, since I have a maximum 
length on them. So I have a year field that I fill in with "2005", and 
when I get it out of the form it claims to be "2,00".  How do I turn off 
this behaviour?

This is with cocoon 2.1.7. Thanks for any help.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Getting a comma in my numbers

Posted by Jean-Baptiste Quenot <jb...@anyware-tech.com>.
* Bruce Atherton:

> I'm using  Cocoon forms,  and every  time I have  a number  in a
> field it  is coming back  formatted with commas embedded  in the
> number. [...] How do I turn off this behaviour?

First  you  can  set  the   "locale"  property  of  your  form  JS
object to  influence the number  formatting.  You can  also change
the  formatter  in  the   binding.   The  following  example  uses
PlainLongConvertor instead of the default FormattingLongConvertor:

<fb:value id="my-number" path="path-to-my-number">
  <fd:convertor datatype="long" type="plain"/>
</fb:value>

HTH,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org