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

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

    Thanks in Advance.

    • 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

    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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s