Package org.fenixedu.academic.dto.projectSubmission

Examples of org.fenixedu.academic.dto.projectSubmission.CreateProjectSubmissionBean


        request.setAttribute("attends", attends);
        request.setAttribute("project", getProject(request));
        request.setAttribute("studentGroup", studentGroup);
        request.setAttribute("person", getUserView(request).getPerson());
        request.setAttribute("projectSubmission", new CreateProjectSubmissionBean());

        RenderUtils.invalidateViewState("createProjectSubmission");
        return mapping.findForward("submitProject");

    }
View Full Code Here


    public ActionForward submitProject(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException, IOException {

        final IViewState viewState = RenderUtils.getViewState("createProjectSubmission");
        final CreateProjectSubmissionBean createProjectSubmissionBean =
                (CreateProjectSubmissionBean) viewState.getMetaObject().getObject();

        try (InputStream is = createProjectSubmissionBean.getInputStream()) {
            byte[] bytes = ByteStreams.toByteArray(is);
            try {
                CreateProjectSubmission.run(bytes, createProjectSubmissionBean.getFilename(),
                        createProjectSubmissionBean.getAttends(), createProjectSubmissionBean.getProject(),
                        createProjectSubmissionBean.getStudentGroup(), createProjectSubmissionBean.getPerson());

            } catch (DomainException ex) {
                saveActionMessageOnRequest(request, ex.getKey(), ex.getArgs());

                return prepareProjectSubmission(mapping, form, request, response);
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.projectSubmission.CreateProjectSubmissionBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.