I am using JSF2.1.13,Primefaces5.3,Jboss7.1 OR Jboss6.3 EAP for my web-application and i am using diffrent-2 input component for taking input from user but all the input component showing 0 when page loaded also when i am submitting form this default zero value show to datatlist as well.
Now when i google it plenty of question and answer i got about this issue
- Integer getting default value 0 where it required to be NULL in Java
- In jsf how integer properties get value 0 in client page without process validation phase for first time request
- jsf: integer property binded to a inputtext in UI is set to zero on submit
But this all solution work well with Tomcat. While i am using Jboss its not working .Next thing no any exact solution we have even after using the latest JSF jars?
Edit:-
public class EquipAssociations implements Serializable
private Integer minCardinality;
private Integer maxCardinality;
}
and value binding code
<p:spinner id="maxCardId" value="#{equipTemplateBean.equipmentAssnObj.maxCardinality}" min="1" />
EDIT1:-
Changes in web.xml file
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>