We can covert a Numeric field format according to the standard locale in ADF Faces using af:convertNumber.
When we have a numeric field on the page there is a converter component under it, called af:convertNumber. It is an extension of the standard JSF javax.faces.convert.NumberConverter.
- Change GroupingUsed to true, by default it is true
- Now set Locale, you can do this using managed bean or simply write it here
- Managed Bean code to create Locale- private Locale format=Locale.ENGLISH;
- Now see various formats of Amount using Locale-
- Create a variable of type Locale and its getter -setter
- Use it in Locale field of af:convertNumber
- You can also set Max and Min fraction digits in af:convertNumber’s property.
Cheers 🙂 Happy Learning
I’m an Oracle ACE, Blogger, Reviewer,
Technical Lead working on Oracle ADF