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}" />
</h:selectOneListbox>
@ManagedBean
@ViewScoped
public class StudBean implements Serializable {
@Override
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;
}