On Tue, 2006-03-14 at 10:40 -0600, Brian Maddy wrote:
> Hi,
> 
> I am using the output widget to output a number to the user.  I would 
> like to format it so it looks like this 1,234,567 instead of 1234567.  I 
> figured this would be a styling thing, but couldn't find anything in the 
> docs.  I've also tried the following, but it doesn't seem to work:
> 
>         <fd:output id="unitCount">
>             <fd:label>units:</fd:label>
>             <fd:datatype base="string"/>
>             <fd:convertor datatype="integer" type="formatting">
>                 <fd:patterns>
>                     <fd:pattern>###,###</fd:pattern>
>                 </fd:patterns>
>             </fd:convertor>
>         </fd:output>
> 
> Anyone know how to do something like that?

The fd:convertor needs to be inside the fd:datatype:

http://cocoon.apache.org/2.1/userdocs/widgetconcepts/datatypes.html

Also, I thought the formatting convertor is the default, so I would
suppose that this happens without doing any effort.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to