<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Formular is loosing decimal point</title><link>https://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-point</link><description>&lt;p&gt;After sending the form, the decimal point is lost. For example, 0,78 becomes 78&lt;/p&gt;
&lt;p&gt;This happens whenever I map &lt;code&gt;p:inputNumber&lt;/code&gt; to the data type &lt;code&gt;java.lang.Number&lt;/code&gt;.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-point" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 30 Apr 2018 04:38:23 -0400</lastBuildDate><item><title>Answer by Alex Suter</title><link>https://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-point/3246</link><description>&lt;p&gt;This problem occurs if you use a formatting locale &lt;code&gt;ivy.session.setFormattingLocale(...)&lt;/code&gt; which use a &lt;em&gt;comma&lt;/em&gt; as decimal separator (like Germany or Austria).&lt;/p&gt;
&lt;p&gt;The problem seems to be a contract violation between &lt;strong&gt;Primefaces&lt;/strong&gt; and &lt;strong&gt;JSF&lt;/strong&gt;:
&lt;a href="https://github.com/primefaces/primefaces/issues/2147"&gt;https://github.com/primefaces/primefaces/issues/2147&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As it looks now there is only a problem if you use &lt;code&gt;java.lang.Number&lt;/code&gt; 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:   &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;p:inputNumber value="#{data.dataclass.myNumber}"&amp;gt;
   &amp;lt;f:convertNumber type="number" locale="en" /&amp;gt;
&amp;lt;/p:inputNumber&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Mon, 30 Apr 2018 04:38:23 -0400</pubDate><guid>https://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-point/3246</guid></item></channel></rss>