• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF, rich:pickList and custom converter - Solving "Validation Error: Value is not valid" message

 
Daniel Cugler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a JSF 2.0 project, and I am facing a problem when using the rich:pickList (richfaces 4) component with a custom converter.

I can populate the picklist left column rightly. But, when I move some item from left list to the right (by clicking in the pickList "add" button) and I try to submit the form that contains the pickList, I receive the following error message:

"mainForm:picklist: Validation Error: Value is not valid"

I have already overridden the methods equals and hashCode in my model class (Pessoas.java), but the problem remains.

Any idea about how to solve this problem?

Thank you!

cadastroEvento.xhtml



CadastroEventoBean.java


Pessoa.java (model - created automatically by hibernate)


EventSelectedApresentadorEventoConverter.java (custom converter)
 
Daniel Cugler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved. My mistake. The method "PessoaLogic.getByID" was returning a list of objects and not just a single one. So, the method "getAsObject" in the converter was not working properly. Now, everything is working like a charm.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!