hours .put(executionCourseId.toString(), dps.getInfoProfessorship().getHours() .toString());
if(dps.getInfoProfessorship().getHours() != null){ hours.put(executionCourseId.toString(), dps.getInfoProfessorship().getHours() .toString()); }
    private void prepareForm(DynaActionForm dynaForm, HttpServletRequest request) {        InfoExecutionYear infoExecutionYear = (InfoExecutionYear) request.getAttribute("executionYear");        InfoTeacher infoTeacher = (InfoTeacher) request.getAttribute("infoTeacher");        dynaForm.set("idInternal", infoTeacher.getIdInternal());        dynaForm.set("teacherId", infoTeacher.getIdInternal());        if (dynaForm.get("executionYearId") == null) {            dynaForm.set("executionYearId", infoExecutionYear.getIdInternal());        }        List detailedProfessorshipList = (List) request.getAttribute("detailedProfessorshipList");        List executionCourseIds = new ArrayList();        Map hours = new HashMap();        for (int i = 0; i < detailedProfessorshipList.size(); i++) {            DetailedProfessorship dps = (DetailedProfessorship) detailedProfessorshipList.get(i);            Integer executionCourseId = dps.getInfoProfessorship().getInfoExecutionCourse()                    .getIdInternal();            if (dps.getResponsibleFor().booleanValue()) {                executionCourseIds.add(executionCourseId);            }            if (dps.getMasterDegreeOnly().booleanValue()) {                hours                        .put(executionCourseId.toString(), dps.getInfoProfessorship().getHours()                                .toString());            }        }        dynaForm.set("executionCourseResponsability", executionCourseIds.toArray(new Integer[] {}));        dynaForm.set("hours", hours);    }