Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation Error: Value is not valid

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am developing a small application in which the user can enter the student details which includes the course in which the user can select 1 or more subjects
. adding the student works fine but while editing am facing a problem("Validation Error: Value is not valid") only when i reselect the course and the subjects
update will works fine if i dont change the course ,

faces config



editStudentInfo.xhtml



StudentInfo.java




CourseInfo.java



SubjectInfo.java



UpdateStudentInfoBean
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you debugged the processValueChange method? Does it do what you expect it to?
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James Boswell for your reply ,

I am getting the correct value (selected course id) while debugging the processValueChange method.
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by the way the error "Validation Error: Value is not valid " is related to picklist
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This snippet means there needs to be a setSelectedSubjects(List<Integer>) method in your UpdateStudentInfoBean class. I cannot see such a method.

There is a method called setSelectedSubjectsInfo(List<Integer>). Should this be renamed to setSelectedSubjects?
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James Boswell for your reply,
This snippet means there needs to be a setSelectedSubjects(List<Integer>) method in your UpdateStudentInfoBean class. I cannot see such a method.

There is a method called setSelectedSubjectsInfo(List<Integer>). Should this be renamed to setSelectedSubjects?


I have renamed it , but still getting the same error
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the suggestions are appreciated
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the suggestions are appreciated
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic