Changing af:convertNumber Format according to Locale- Oracle ADF

Sharing is Caring

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.

The user can change it for Integer digits, fraction digits etc. but here I am talking about the format of Number(Amount), to do this follow these steps.
    • 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-

Using en-US-
 Using fr-
 Using hi-IN-for Hindi fonts
 Using de-DE –
So this is the thing how you can change formatting, this can also be done by the managed bean code.
    • Create a variable of type Locale and its getter -setter
    • Use it in Locale field of af:convertNumber  

    public void chinaButton(ActionEvent actionEvent) {



    public void frenchButton(ActionEvent actionEvent) {



    public void italianButton(ActionEvent actionEvent) {


  • You can also set Max and Min fraction digits in af:convertNumber’s property.

Cheers 🙂 Happy Learning

Related Posts

2 thoughts on “Changing af:convertNumber Format according to Locale- Oracle ADF”

  1. Thanks Ashish… your blogs are really very helpful. I need one help. We want to set number format as 20,20,200.00 as per Indian currency. What local we can use. I have used en-in local but no luck. We can not use currency type directly. Plz suggest.

Leave a Reply

Your email address will not be published. Required fields are marked *