myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giri Prasad <>
Subject Re: Jsf Hibernate problem in SelectOneList event
Date Thu, 31 Jan 2013 16:52:21 GMT

3) Does session scoped have to be used?? Try using a limited scope such as
ViewScoped when you don't need to have session scoped objects.

I made the following changes :

 Changed the jsf file to use courseid, for the list box, as in below code.

 Made the bean to view scoped.

 Implemented equals method using Netbeans code gen function.

Selecting a courseid from the list and pressing <Details> button, produces the following
error, on the web form:

j_id_id12:studentList: Validation Error: Value is not valid 

                <h:selectOneListbox id="courseList" value="#{studBean.courseID}"
                    <f:selectItems value="#{studBean.courseList}" />

public class StudBean implements Serializable  { 
    public boolean equals(Object obj) { 
        if (obj == null) { 
            return false; 
        if (getClass() != obj.getClass()) { 
            return false; 
        final StudBean other = (StudBean) obj; 

        if ((this.courseID == null) ? (other.courseID != null) : !this.courseID.equals(other.courseID))
            return false; 
        return true; 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message