// Student Chooser
IModel<User> studentModel = ISISession.get().getStudentModel();
if (studentModel == null) {
studentModel = new HibernateObjectModel<User>(User.class);
}
studentChoice = new UserChoice("studentChoice", studentModel, getUserListModel());
if (studentChoice.getModelObject() == null) { // If session did not have a student or student was not in the session's period, reset session's student
ISISession.get().setStudentModel(null);
}
studentChoice.setOutputMarkupId(true);