-
1. Re: How to interpret empty strings as null in WildFly
ctomc Feb 5, 2014 3:06 PM (in response to domme)What version of WildFly are you using?
it appears to be mojarra issue https://java.net/jira/browse/JAVASERVERFACES-3071 which was fixed in 2.2.5
WildFly got 2.2.5 mojarra recently, so can you try if it is any different with newer latest version of wildfly: WildFly-latest-master [Jenkins]
--
tomaz
-
2. Re: How to interpret empty strings as null in WildFly
domme Feb 6, 2014 1:47 PM (in response to ctomc)I just updated to WildFly 8.0.0.Final-SNAPSHOT including Mojarra 2.2.5 (Mojarra 2.2.5-jbossorg-3 20140128-1641).
Unfortunately, I cannot see any difference. Still, my setText(String s) method is called with an empty string when I leave the field blank.
The only way I currently see is surrounding the setter method with an interceptor method that transforms an empty string to null. But this requires annotating all string setter methods in my bean and shows a significant change in behaviour from JBoss 7.1 to Wildfly which I did not expect.
Any other ideas?
Many thanks and best regards,
Dominik
-
3. Re: How to interpret empty strings as null in WildFly
ctomc Feb 17, 2014 9:59 AM (in response to domme)do you by any chance have jboss-el.jar in your deployment?
-
4. Re: How to interpret empty strings as null in WildFly
domme Feb 17, 2014 11:55 AM (in response to domme)I am afraid not.
What I see in my WEBINF\lib folder:
So the el-Library is obviously taken from the provided JBoss pool, isn't it?
The only thing I changed in the standard WildFly libraries was the adding of the MS SQL driver.
Is there any sensitive standalone.xml configuration that I could have damaged.
Do you have an example .war (with source files) that shows a proper handling of null values?
Many thanks!
-
5. Re: How to interpret empty strings as null in WildFly
ricardo.jr Oct 30, 2014 4:02 PM (in response to domme)I had the same problem Dominik, using wildfly-8.1.0.Final and jsf mojarra-1.2_15.
The Strings arrived empty instead of null.
I solved this updating the wildfly EL implementation to javax.el-3.0.1-b05.jar on module org.glassfish.javax.el.
I didn't use javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL property in my web.xml