public ActionForward listExecutionCourseCourseLoads(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
DynaActionForm editShiftForm = (DynaActionForm) form;
InfoShift infoShiftToEdit = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);
InfoExecutionCourse infoExecutionCourse =
RequestUtils.getExecutionCourseBySigla(request, (String) editShiftForm.get("courseInitials"));
if (infoShiftToEdit.getInfoDisciplinaExecucao().getExecutionCourse().equals(infoExecutionCourse.getExecutionCourse())) {
editShiftForm.set("courseInitials", infoShiftToEdit.getInfoDisciplinaExecucao().getSigla());
editShiftForm.set("nome", infoShiftToEdit.getNome());
List<ShiftType> shiftTypes = infoShiftToEdit.getShift().getTypes();
String[] selectedshiftTypesArray = new String[shiftTypes.size()];
for (int i = 0; i < shiftTypes.size(); i++) {
ShiftType shiftType = shiftTypes.get(i);
selectedshiftTypesArray[i] = shiftType.getName();
}
editShiftForm.set("shiftTiposAula", selectedshiftTypesArray);
editShiftForm.set("lotacao", infoShiftToEdit.getLotacao());
//editShiftForm.set("comment", infoShiftToEdit.getComment());
} else {
editShiftForm.set("shiftTiposAula", new String[] {});
editShiftForm.set("lotacao", Integer.valueOf(0));