Thanks for the suggestion, but I unfortunately couldn't get this to work either.

This will work:
<i18n:number type="number" pattern="###,###">1234567890</i18n:number>
Returns: 1,234,567,890

But this will not because the ft:widget is replaced with the number surrounded by a <span> tag <i18n:number type="number" pattern="###,###"><ft:widget id="unitCount"/></i18n:number> Returns: <i18n:number type="number" pattern="###,###"><span id="developmentselector.unitCount">28182</span></i18n:number>
and then: java.util.EmptyStackException
resource://org/apache/cocoon/forms/resources/forms-field-styling.xsl - 703:15

Anyone have any other ideas?

Thanks,
Brian

Ard Schrijvers 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?

Try to make use of i18n:number to make it locale sensitive: See
http://cocoon.apache.org/2.1/userdocs/i18nTransformer.html



Thanks!
Brian


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



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


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

Reply via email to