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 ? Karel asked 03.03.2016 at 08:44 tauser Reguel Werme... ♦♦ |
Hi, we have found the solution to set up ivy.vm.additional.options=-Dorg.apache.el.parser.COERCE_TO_ZERO=false 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 ?) Karel
link
This answer is marked "community wiki".
answered 18.04.2016 at 15:34 tauser cool. the following code should do the same at runtime:
(19.04.2016 at 08:41)
Reguel Werme... ♦♦
|
I think you can determine if the 0 was auto initialized by using the IvyDefaultValues helper:
There exists also a community project 'dataclass-nuller' which helps to nullify auto initialized data class values. See https://github.com/ivy-supplements/dataclass-nuller/releases answered 14.03.2016 at 09:32 Reguel Werme... ♦♦ Hi, thank you for your response. This would be great, but isDefaultObject returns false. I think it comes from jsf view already as 0. I have tried p:inputText instead of p:inputNumber, but it is the same. Karel
(15.03.2016 at 07:25)
tauser
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 03.03.2016 at 08:44
Seen: 2,667 times
Last updated: 24.05.2016 at 11:11