Gary VanMatre wrote:
You have a couple options:
<component jsfid="outputScore" extends="outputText">
    <converter jsfid="convertNumber">
      <attributes>
        <set name="maxFractionDigits" value="1" />
      </attributes>
    </converter>
</component>

Oh, that explains why my converter wasn't working. I didn't even realize there was a <converter> element for <component>s. Makes sense.
But, I missed many of the base converter's.  The defaults are defined in the 
/META-INF/clay-config.xml file in the clay archive.
If you find some missing from the JSF spec., please post your definition in a 
bugzilla ticket and I'll add it to the base clay config (javax.faces.Number is 
missing)

Ok, I'll post the below converter in a bugzilla ticket.
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?

The converter component definition is correct and this one is missing from the base clay 
config file.  If you want to apply this converter to a component, you need to nest it 
under the component as a "converter" node or provide the componentType 
(registered name of the converter) as a converter attribute of the target component (see 
example above).



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

Reply via email to