Object args[] = { selection, candidateID, attributedCredits, givenCreditsRemarks };
Object args[] = { selectedCurricularCourses, candidateID, attributedCredits, givenCreditsRemarks };
    public ActionForward chooseCurricularCourses(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        HttpSession session = request.getSession(false);        //		if (!isTokenValid(request)){        //			return mapping.findForward("BackError");        //		} else {        //			generateToken(request);        //			saveToken(request);        //		}        DynaActionForm chooseCurricularCoursesForm = (DynaActionForm) form;        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer[] selection = (Integer[]) chooseCurricularCoursesForm.get("selection");        Integer degreeCurricularPlanID = (Integer) chooseCurricularCoursesForm                .get("degreeCurricularPlanID");        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        if (!validChoice(selection)) {            throw new NoChoiceMadeActionException(null);        }        Integer candidateID = (Integer) chooseCurricularCoursesForm.get("candidateID");        String attributedCreditsString = (String) chooseCurricularCoursesForm.get("attributedCredits");        Double attributedCredits = null;        if ((attributedCreditsString == null) || (attributedCreditsString.length() == 0)) {            attributedCredits = new Double(0);        } else {            attributedCredits = Double.valueOf(attributedCreditsString);        }        String givenCreditsRemarks = (String) chooseCurricularCoursesForm.get("givenCreditsRemarks");        try {            Object args[] = { selection, candidateID, attributedCredits, givenCreditsRemarks };            ServiceManagerServiceFactory.executeService(userView, "WriteCandidateEnrolments", args);        } catch (NotAuthorizedException e) {            throw new NotAuthorizedActionException(e);        } catch (NonExistingServiceException e) {            throw new NonExistingActionException(e);        }        List candidateEnrolments = null;        try {            Object args[] = { candidateID };            candidateEnrolments = (List) ServiceManagerServiceFactory.executeService(userView,                    "ReadCandidateEnrolmentsByCandidateID", args);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        Iterator coursesIter = candidateEnrolments.iterator();        float credits = attributedCredits.floatValue();        while (coursesIter.hasNext()) {            InfoCandidateEnrolment infoCandidateEnrolment = (InfoCandidateEnrolment) coursesIter.next();            credits += infoCandidateEnrolment.getInfoCurricularCourse().getCredits().floatValue();        }        request.setAttribute("givenCredits", new Double(credits));        if ((candidateEnrolments != null) && (candidateEnrolments.size() != 0)) {            orderCandidateEnrolments(candidateEnrolments);            request.setAttribute("candidateEnrolments", candidateEnrolments);        }        InfoExecutionDegree infoExecutionDegree = null;        try {            Object args[] = { candidateID };            infoExecutionDegree = (InfoExecutionDegree) ServiceManagerServiceFactory.executeService(                    userView, "ReadExecutionDegreeByCandidateID", args);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        request.setAttribute("executionDegree", infoExecutionDegree);        request.setAttribute("candidateID", candidateID);        return mapping.findForward("ChooseSuccess");    }