The validation is failing because after your converter converts the String representation of AssessmentType back to an object, JSF iterates over the existing values (assessmentBean.assessment.type.fields
) and compares this recently converted object with all those existing ones.
Since you did not implement Object#equals
for AssessmentType, it will default to an object identity comparison (roughly spoken, the memory address of your object) , which will of course fail.
The solution is thus to either implement Object#equals
, or let the converter get the object from assessmentBean.assessment.type.fields
instead of from AssessmentTypeManager
.