After sending the form, the decimal point is lost. For example, 0,78 becomes 78

This happens whenever I map p:inputNumber to the data type java.lang.Number.

asked 30.04.2018 at 04:29

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
1.4k102118122
accept rate: 77%

edited 30.04.2018 at 04:29


This problem occurs if you use a formatting locale ivy.session.setFormattingLocale(...) which use a comma as decimal separator (like Germany or Austria).

The problem seems to be a contract violation between Primefaces and JSF: https://github.com/primefaces/primefaces/issues/2147

As it looks now there is only a problem if you use java.lang.Number and Primefaces number components. This issue will be fixed with ivy 6.0.13 / 7.0.5 / 7.2. For other versions use the following workaround:

<p:inputNumber value="#{data.dataclass.myNumber}">
   <f:convertNumber type="number" locale="en" />
</p:inputNumber>
link

answered 30.04.2018 at 04:38

Alex%20Suter's gravatar image

Alex Suter ♦♦
3.1k122247
accept rate: 84%

edited 30.04.2018 at 04:38

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79

Asked: 30.04.2018 at 04:29

Seen: 2,279 times

Last updated: 30.04.2018 at 04:38