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}"/>

10 comments

  1. Sunil Vijayakumar's avatar
    Sunil Vijayakumar

    After i give immediate=”true” my form bean values are lost, can any one help me in regarding this.
    Code:

    Thanks in Advance.

    • mousouchop's avatar
      mousouchop

      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.

  2. Hewan's avatar
    Hewan

    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?

Leave a reply to Juan Cancel reply