JSF 2.0 command button “Conversion Error setting value” for ‘null Converter’
Add immediate=”true” to jsf commandButton if your getting ‘Conversion Error setting value’ for ‘null Converter’ error message when using JSF 2.
Sample code:
Before:
<h:commandButton value="your value" action="#{bean.action}"/>
After:
<h:commandButton value="your value" immediate="true" action="#{bean.action}"/>
Yes, You are right! Thanks for publishing!
But in this case, attribute values will be lost from the formbean.
It’s Working! But i need clear solution after giving immediate=”true”.
What do you mean by a clear solution? Give me a little bit more information and I’ll try and help.
Why it’s working? after we give immediate=”true”, need an explanation on that.
After i give immediate=”true” my form bean values are lost, can any one help me in regarding this.
Code:
Thanks in Advance.
immediate = “true”, will make your button perform it’s assigned action without validating the fields on the form, which means that they aren’t persisted to your backing bean, or the underlying database.
You can write your own method to validate and save the form values, or find another solution to the problem that you are trying to fix using immediate = “true”. Those are the only two options I have found at this point in my understanding of JSF.
thank uuuu,this problem was torturing me
hi in my case the conversion error seem to be solved but it created some exception , the save() method is throwing exception message,pleas help?
Thanks a lot!!! it worked 🙂