cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: CFORMS: datatype - formatting (decimal)
Date Mon, 10 Apr 2006 19:08:46 GMT
On Sat, 2006-04-08 at 10:02 +0100, 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

The convertor in the binding is only relevant to the binding, you need
to specify it in the form definition too.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Mime
View raw message