beginerdeveloper beginerdeveloper - 9 days ago 6
Java Question

Format number with convertNumber

Format number with convertNumber in ADF.

<af:inputText contentStyle="text-align:right">
<af:convertNumber groupingUsed="true" pattern="#.###.###" type="number"/>
</af:inputText>


If input value is
10000000
I want output of
10,000,000
but pattern not working.

Answer

you are using the correct pattern but for wrong property.

Try this one..

<af:inputText contentStyle="text-align:right" id="it1" label="Test">
   <af:convertNumber groupingUsed="true" type="number" messageDetailConvertNumber="#,###,##"/>
</af:inputText>

It works fine for me.

Comments