I'm trying to format the output of some numbers. Before, the way I would do this was:

<h:outputText value="#{myBean.score}">
 <f:convertNumber maxFractionDigits="1" />
</h:outputText>

I've tried this with the clay-config.xml with:

 <component jsfid="outputScore" extends="outputText">
   <element renderId="0" jsfid="convertNumber">
     <attributes>
       <set name="maxFractionDigits" value="1" />
     </attributes>
   </element>
 </component>

But that gives me a NPE with the message "The component identified by jsfid convertNumber could not be found." Was the f:convertNumber component not mapped on purpose or is this a simple oversight?

I tried creating my own mapping using:

 <component jsfid="numberConverter" componentType="javax.faces.Number" >
   <attributes>
     <set name="currencyCode" bindingType="Early" />
     <set name="currencySymbol" bindingType="Early" />
     <set name="maxFractionDigits" bindingType="Early" />
     <set name="minFractionDigits" bindingType="Early" />
     <set name="maxIntegerDigits" bindingType="Early" />
     <set name="minIntegerDigits" bindingType="Early" />
     <set name="pattern" bindingType="Early" />
     <set name="groupingUsed" bindingType="Early" />
     <set name="integerOnly" bindingType="Early" />
   </attributes>
 </component>

But that throws an exception saying that javax.faces.Number is an undefined component type. Any ideas what I did wrong?

Thanks,
Rich

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

Reply via email to