5 Replies Latest reply on Oct 30, 2014 4:02 PM by Ricardo Jr. Rodrigues

    How to interpret empty strings as null in WildFly

    Dominik Lübbers Newbie

      I am currently struggling with a migration from JBoss 7.1 to Wildfly.

      I have a simple bean with a string property and a JSF 2.2 form that displays this value and adds an h:inputText component for editing.

      Whenever the user leaves the field open, the setter method is invoked with an empty string as parameter (instead of null).

       

      I set the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL property to true - without success.

      In JBoss 7.1 it was possible to set the org.apache.el.parser.COERCE_TO_ZERO property to false, but this seems to have no effect in Wildfly.

       

      Any ideas how to convert "empty fields" into null values? Any special converters possible?

       

      Many thanks for the smallest hint...

      Dominik