-
1. Re: I need null values in the model from empty fields form view
zeeman Feb 29, 2012 5:48 PM (in response to gerleotta)1 of 1 people found this helpfulIt's jsf not seam. Depending on JSF impl you're using, you can use a flag in web.xml to tell JSF engine to pass nulls for empty fields.
-
2. Re: I need null values in the model from empty fields form view
gerleotta Feb 29, 2012 7:03 PM (in response to zeeman)well.. I'm using the "Jboss AS 7" with its JSF 2.1 implementation (Mojarra). Do you know how configure it for treat the all input empty fields as null (not as "" or 0, etc.)?
I tried use:
<context-param> <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name> <param-value>true</param-value> </context-param> but it not working.
I think that the problem is the EL evaluator, but i don't know how to change it.
How can the rest of people work with non null values? How you can diferentiate a non entry data fields of a 0 integer data value (ie) ?
-
3. Re: I need null values in the model from empty fields form view
gerleotta Feb 29, 2012 10:29 PM (in response to gerleotta)Ok, I found that problem is the EL implementation of Jboss AS7. I solved the problem passing this property -Dorg.apache.el.parser.COERCE_TO_ZERO=false to JVM.
source: http://stackoverflow.com/questions/2203322/hinputtext-return-a-empty-string-instead-of-null