cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: CFORMS: datatype - formatting (decimal)
Date Sat, 08 Apr 2006 12:15:10 GMT
Hi Peter,
just use :

<fd:datatype base="integer">
  <fd:convertor type="plain"/>

If you have a big application, with many integer fields, an you want all 
of them to use the plain convertor without having to type <fd:convertor 
type="plain"/> every time, you could also consider changing your 
cocoon.xconf file to use "plain" as the default convertor for integer 
type, changing this lines :

      <datatype name="integer" 
        <convertors default="formatting" plain="plain">

 to this :

      <datatype name="integer" 
        <convertors default="plain" plain="plain">

It's a bit untidy (because your application will rely on a custom cocoon 
configuration) but could save a lot of time.


Peter Sparkes wrote:

> HI,
> I am using CForms to amend xml documents. I have several field widgets 
> with datatype 'integer'. The default formatting for integer is of the 
> form '1,234,567,890'. I need to change the formatting to '1234567890'.
> In my binding file I am using for example
>  <fb:value id="lodgeNumber" path="@no" >
>      <fd:convertor type="formatting"  datatype="integer" >
>          <fd:patterns><fd:pattern>############</fd:pattern></fd:patterns>
>      </fd:convertor>
>  </fb:value>
> On loading a document with attribute no="1234567890" I still get 
> '1,234,567,890' in the Form, however, when saving the amended form it 
> works correctly and I get no="1234567890" in the xml doc. If I change 
> the ####### to for example ##,##,##,##,## the form still gives 
> '1,234,567,890', however, the saved xml correctly  reflects  the new 
> pattern eg 12,34,56,78,90
> Please, how do I get the format '1234567890' in the CForm
> Peter Sparkes
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Simone Gianni

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message