I have read many posts about this JSF2 validation error, but cannot see why this is occurring. My select items are a List where ListItem is a POJO with two String fields, key, and value. When I submit the page choosing a select item option with a value of "0", I get the following error: Validation Error: Value is not valid.
The value to be submitted is bound to an int. Here is the equals method in ListItem, but I have a debug point on this method and it doesn't appear to get hit, so I can't see if this is the issue:
public boolean equals(Object other)
{
if (other == null || !(other instanceof ListItem))
return false;
ListItem otherLI = (ListItem) other;
return otherLI.key.equals(key);
}
Any ideas?