Fabrício Fonseca created MYFACES-4319:
-----------------------------------------

             Summary: Null submitted values handling error
                 Key: MYFACES-4319
                 URL: https://issues.apache.org/jira/browse/MYFACES-4319
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.3.6
         Environment: Open Liberty 20.0.0.1
            Reporter: Fabrício Fonseca


When running MyFaces with it seems like an error occurs preventing "Process 
Validations" phase to execute if you try to submit empty string values. 
 
I found out when trying to use the TrimConverter utility class from the 
OmniFaces library. This is a Faces Converter which trim all submitted string 
values. If the trimmed value has a length of 0, the converter returns null. 
Whenever i try to submit a form leaving the fields empty, the properties of the 
backing bean are not getting validated neither the bean method associated with 
the submit action is invoked. The form is rendered again. 

 
Steps to reproduce:
 
1- Create a form with some fields linked with corresponding backing bean string 
properties;
 
2 - Add @NotNull constraint to the backing bean properties;
 
3 - Create a Faces Converter which converts empty string values to null. Attach 
the converter to java.lang.String class (through faces-config 
<converter-for-class> element)
 
4 - Run the project and try to submit empty string values;
 
 
Please note this error may be related to this: 
https://stackoverflow.com/questions/56279977/blank-input-string-fields-submitted-as-empty-strings-vs-null-jsf-2-3-myfaces
 
 
 
 
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to