<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: auto initialisation / number 0 from JSF View</title><link>https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view</link><description>&lt;p&gt;Hello,
   we have a datatable in jsf view, one column is a number in bean. After submiting form (ivy event) we receive
initialised number 0, so our validation cannot check if user inserted it manually (field is mandatory, 0 must be 
explicit inserted). How can we avoid the auto initialisation ?&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 18 Apr 2016 15:34:00 -0400</lastBuildDate><item><title>Answer by tauser</title><link>https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view/1735</link><description>&lt;p&gt;Hi, 
   we have found the solution to set up &lt;/p&gt;
&lt;p&gt;ivy.vm.additional.options=-Dorg.apache.el.parser.COERCE_TO_ZERO=false&lt;/p&gt;
&lt;p&gt;But it must be done in all environments (each server, each designer in Development Team). Is there any possibility
   to set this in Run time (API ?)&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tauser</dc:creator><pubDate>Mon, 18 Apr 2016 15:34:00 -0400</pubDate><guid>https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view/1735</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view/1680</link><description>&lt;p&gt;I think you can determine if the 0 was auto initialized by using the IvyDefaultValues helper:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ch.ivyteam.ivy.scripting.objects.util.IvyDefaultValues.isDefaultObject(Object)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There exists also a community project 'dataclass-nuller' which helps to nullify auto initialized data class values. See &lt;a href="https://github.com/ivy-supplements/dataclass-nuller/releases"&gt;https://github.com/ivy-supplements/dataclass-nuller/releases&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 14 Mar 2016 09:32:38 -0400</pubDate><guid>https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view/1680</guid></item></channel></rss>