Home > richfaces picklist > richfaces picklist validation error

Richfaces Picklist Validation Error

not work correctly without it enabled. Please turn JavaScript back on and reload this page. All Places > RichFaces > Discussions Please enter a title. You can not post a blank message. Please type your message and try again. 2 Replies Latest reply on Feb 12, 2009 3:03 AM by Gianfranco Zola rich:pickList and Converter problem Gianfranco Zola Feb 10, 2009 4:50 AM Hi!May be I discovered some bug in the Richfaces 3.3.0 GA.The situation is, that I query some records with Hibernate from a database wich is stored in a List object, wich is the source of the pickList (f:selectitems). I use a List for the right side (value, selected items container).In the faces-config.xml I configured a converter for the Library class, the converter class name is LibraryConverter.So everything looks perfect, until I want to submit the pickList with the selected items in it. Than I get a validation error, that: "j_id38:Validation error: Value is not valid."I found out, that for some reason the pickList upon submit does not find the converter class for the Library object, and therefore it does not use it while submitting. I configured the converter in the faces-config.xml in an other way, and I gived an ID for the converter, and set the converter-class, and I gave the rich:pickList this converter ID into the converter attribute, and it worked in this way. But I think it should work also the previous way I described.Please find below the code snipets: faces-config.xml: Converter configuration, wich did not work package.Library package.LibraryConverter Converter configuration, wich did work LibraryConverter package.LibraryConverter page.xhtml: rich:pickList declaration, wich did not work rich:pickList declaration, wich did work Oh, one

Jonathan Rasmusson on-line!See this thread for details. Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum! Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: JSF JSF, rich:pickList and custom converter - Solving "Validation Error: Value is not https://developer.jboss.org/thread/14100 valid" message Daniel Cugler Greenhorn Posts: 5 posted 1 year ago 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 https://coderanch.com/t/644825/JSF/java/JSF-rich-pickList-custom-converter 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 #{pessoa.nomeCompleto} CadastroEventoBean.java public class CadastroEventoBean { private List pessoas; private List pessoasSelecionadas; /* getters and setters */ ... } Pessoa.java (model - created automatically by hibernate) public class Pessoa implements java.io.Serializable { private long cpf; private String nomeCompleto; private String email; private String telefoneContato; private String senhaLogin; private String cidadeResidencia; private String estadoResidencia; private NaoAlunoIftm naoAlunoIftm; private AlunoIftm alunoIftm; private Set apresentador_evento = new HashSet(0); private Set evento_vai_assistir = new HashSet(0); private boolean logged = false; /* getters and setter

values. This happens often when you try to created a pre-selected list.For example, suppose your selectItems are: A, B, C, D, EAnd A & B http://programmingnutsandbolts.blogspot.com/2009/08/richfaces-picklist-validation-error.html are already selected.This means that when the pickList is shows, you want A & B to appear in the right side, and you want C, D, E to appear on the left side.What you need to do is put all five - A, B, C, D & E in the selectItems list (left side list).Then in the list which will hold the selected items (right side richfaces picklist list - the one that you will bind to the value attribute of the picklist), you need to put the select Item value of A & B.richfaces will automatically show A & B on the right and C, D, E on the left.However, if you put A & B in the right side list, and pnly C, D, E in the left side list - richfaces picklist validation you will get a value is not valid error!Secondly, remember that if your value is a non-String object, then you need to override the "equals" method in your Object class. Posted by Mahesh Lavannis at 12:27 PM 1 comment: Ahsun Wrote down Here @September 23, 2009 at 8:23 AMHi.... i'm having the value is not valid error as well... may i know what do u mean by "bind to the value attribute of the picklist" ??? because i have values which are supposed to be display on the right-hand-side but failed to do so....kept getting this - "Value is not String (class=javax.faces.model.SelectItem, value=javax.faces.model.SelectItem@1b30ebb)" ... Hope u can guide me along... ;)ReplyDeleteAdd commentLoad more... Newer Post Older Post Home Subscribe to: Post Comments (Atom) About Me Mahesh Lavannis View my complete profile Blog Archive ► 2012 (1) ► April (1) ► 2010 (3) ► July (1) ► April (1) ► March (1) ▼ 2009 (22) ▼ August (4) richfaces pickList - validation error richfaces pickList - converters richfaces DataTable - getting selected row How to setup a JSF + Richfaces + Facelets project ... ► July (10) ► June (8) Picture Window template. Powered by Blogger.

Related content

No related pages.