Problems with JSF converter: "f:convertNumber"

Asked

Viewed 2,604 times

2

Good night to you all,

In an application I developed in JSF the converter worked well running locally with local mysql database (JPA/Hibernate)

but when I deployed the application and put it into production (server) it didn’t work as it should. Tomcat versions are the same.

output on local machine:

inserir a descrição da imagem aqui

server output:

inserir a descrição da imagem aqui

See that in addition to not showing the "R$" of the currency the values are disfigured!

Anyone can help?

  • 1

    already tried using extra tag attributes like <f:convertNumber type="currency" currencySymbol="R$" locale="pt_BR" /> ?

  • Hello wryel all right? Thanks for answering my question, I forgot to post the tag:<f:convertNumber currencyCode="BRL" type="currency"/> tomorrow I will be these extra attributes just do not understand why I did not give error when running locally. Only give this error on the server.

  • Good Morning, The real symbol problem was solved with currencySymbol="R$" now I have to solve the problem of decimals when registering: 248,89 is saved: 24,889.00. In the registration form inputText has a mask for monetary values and also a <f:convertNumber Pattern="#,##0.00" />

  • I don’t have the environment right now to test, but it’s definitely some attribute that might be missing, I’ve done it in the past. As you mentioned, try changing your Pattern to #.#0.00 (if you take the position of the comma you reported).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.