"overriding the jsf converter javax.faces.convert.bigdecimalconverter in favor of a custom converter using @facesconverter(forclass = bigdecimal.class)" Code Answer

4

in general, overriding default converters (and validators, components and renderers) can't take place with annotations on the same identifier(s). it really has to be explicitly registered in webapp's own faces-config.xml.

in case you intend to override converter="javax.faces.bigdecimal", then do so:

<converter>
    <converter-id>javax.faces.bigdecimal</converter-id>
    <converter-class>com.example.yourbigdecimalconverter</converter-class>
</converter>

in case you intend to override implicit conversion for type java.math.bigdecimal, then do so:

<converter>
    <converter-for-class>java.math.bigdecimal</converter-for-class>
    <converter-class>com.example.yourbigdecimalconverter</converter-class>
</converter>

you need the latter.

By Dolly Aswin on July 24 2022

Answers related to “overriding the jsf converter javax.faces.convert.bigdecimalconverter in favor of a custom converter using @facesconverter(forclass = bigdecimal.class)”

Only authorized users can answer the Search term. Please sign in first, or register a free account.