Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Number Formatting (or Conversion) for amounts and percentages

674663Dec 9 2008
Hi guys,

I have an inquiry for you, i hope you can provide some answers or hints of how i can implement it.

What i need to do is to format numbers (or convert) that describe amounts and percentages.
The amount should follow the pattern χχχ.χχχ.χχχ,χχ € (250.100.123,00 €), and the percentages χχχ,χχ % (23,60 %).

I have tried several things like involving the Format Type (currency or number) in Control Hints for a specific attribute of the object, by determining specific format for number "#,###.00". I have also tried to configure the adf-faces-config.xml file to include:

<decimal-separator>','</decimal-separator>
<number-grouping-separator>'.'</number-grouping-separator>
<currency-code>EUR</currency-code>

My converter extracts the pattern from the view object Protanalxrimpinprog2 like:

<f:convertNumber groupingUsed="false"
pattern="#{bindings.Protanalxrimpinprog2Posokatan.format}"/>

What i get tilll now till now is the exception:

SEVERE: Error during partial-page rendering*
javax.faces.el.EvaluationException: java.lang.NumberFormatException: For input string: "0,"*
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)</stro
or

an exception complaining about the currency sign.

So you please provide me some more info or some other details of how to manage this issue ( i do not know if this is called a conversion or formation of a string).
Is this all about a "silly" parameter of ADF or JHeadstart or JDeveloper (10.1.3.3.0)?
Do i need to write a custom converter or stringformat for this?
Also any documentation is welcome.

I would be glad if you could answer asap.

Thanks a lot

Maik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2009
Added on Dec 9 2008
0 comments
702 views