Validation Error: Value is not valid
By jtb on Jun 01, 2009
There's a reason why most JSF apps stick with string values when it comes to select boxes. Passing object values back and forth is fraught with annoying little gotchas. Here's the latest I ran into.
I set up a select box with an object value and a converter. The select items have object values. All is good. When I submit the form, I see "Validation Error: Value is not valid". My first reaction was that I didn't have any validation on the page, so how could a value be not valid?
This error happens, among other reasons, because the value of the select doesn't match any of the values in the select items. That means the value's class needs to define equals().