public String beforeEdit() {
   diplomaGuideSession.setThesisToEditByTeacher(list.get(myThesisList.getRowIndex()));
   return "editthesis.xhtml?faces-redirect=true";
 }
 @PostConstruct
 private void init() {
   teacher = diplomaGuideSession.getLoggedTeacher();
   list = teacher.getThesisList();
   myThesisList = new ListDataModel<>(list);
 }