Package pt.ist.fenixWebFramework.renderers.components.state

Examples of pt.ist.fenixWebFramework.renderers.components.state.IViewState


        return mapping.findForward("showAlumniList");
    }

    protected AlumniSearchBean reconstructBeanFromRequest(HttpServletRequest request) {

        final IViewState viewState = RenderUtils.getViewState("searchAlumniBean");
        if (viewState != null) {

            return (AlumniSearchBean) viewState.getMetaObject().getObject();

        } else if (request.getParameter("beansearch") != null && request.getParameter("beansearch").length() > 0) {
            return AlumniSearchBean.getBeanFromParameters(request.getParameter("beansearch"));
        }
View Full Code Here


    }

    public ActionForward change(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        final IViewState viewState = RenderUtils.getViewState("editSeniorExpectedInfoID");
        request.setAttribute("senior", viewState.getMetaObject().getObject());

        return mapping.findForward("show-result");
    }
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(),
View Full Code Here

    public ActionForward submitJuryElementsDocument(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        try {

            final IViewState viewState = RenderUtils.getViewState("thesisProcessBean.edit.documents");
            if (!viewState.isValid()) {
                RenderUtils.invalidateViewState("thesisProcessBean.edit.documents");
                return submitJuryElementsDocumentInvalid(mapping, actionForm, request, response);
            }
            ExecuteProcessActivity.run(getProcess(request), SubmitJuryElementsDocuments.class,
                    getRenderedObject("thesisProcessBean"));
View Full Code Here

    public ActionForward replaceDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        try {

            final IViewState viewState = RenderUtils.getViewState("documentBean");
            if (!viewState.isValid()) {
                return juryReportFeedbackUploadInvalid(mapping, form, request, response);
            }

            ExecuteProcessActivity.run(getProcess(request), ReplaceDocument.class, getRenderedObject("documentBean"));
            addSuccessMessage(request, "message.replace.document.done.with.success");
View Full Code Here

        return mapping.findForward("viewScientificCommission");
    }

    private boolean hasUpdatedContactFlag(HttpServletRequest request) {
        IViewState viewState = RenderUtils.getViewState("membersContacts");

        if (viewState == null) {
            return false;
        }

        if (!viewState.isValid()) {
            return false;
        }

        if (viewState.skipUpdate()) {
            return false;
        }

        return true;
    }
View Full Code Here

    }

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

        IViewState viewState = RenderUtils.getViewState("selectiveDownload");
        Integer value = (viewState != null) ? (Integer) viewState.getMetaObject().getObject() : null;
        VariantBean bean = new VariantBean();
        bean.setInteger(value);
        final Project project = getProject(request);
        if (bean.getInteger() != null) {
            final List<ProjectSubmission> projectSubmissions =
View Full Code Here

    public ActionForward showPaymentsWithoutReceipt(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final Person person = getPerson(request);
        final CreateReceiptBean receiptBean = new CreateReceiptBean();
        IViewState viewState = RenderUtils.getViewState("entriesToSelect");
        final Collection<Entry> entriesToSelect =
                (Collection<Entry>) ((viewState != null) ? viewState.getMetaObject().getObject() : null);

        receiptBean.setPerson(person);
        receiptBean.setEntries(getSelectableEntryBeans(
                person.getPaymentsWithoutReceiptByAdministrativeOffices(getAdministrativeOffices()),
                (entriesToSelect != null) ? entriesToSelect : new HashSet<Entry>()));
View Full Code Here

        CompetenceCourse course = getCompetenceCourse(request);
        ExecutionSemester period = getExecutionPeriod(request);

        CompetenceCourseInformationRequestBean bean = null;
        IViewState viewState = RenderUtils.getViewState("editVersion");
        CompetenceCourseInformation information = null;
        if (viewState != null) {
            bean = (CompetenceCourseInformationRequestBean) viewState.getMetaObject().getObject();
            ExecutionSemester beanPeriod = bean.getExecutionPeriod();
            if (beanPeriod == null) {
                beanPeriod = ExecutionSemester.readActualExecutionSemester();
                bean.setExecutionPeriod(beanPeriod);
            }
            information = bean.getCompetenceCourse().findCompetenceCourseInformationForExecutionPeriod(beanPeriod);
        }

        if (bean == null) {
            bean =
                    new CompetenceCourseInformationRequestBean(
                            course.findCompetenceCourseInformationForExecutionPeriod((period != null) ? period : ExecutionSemester
                                    .readActualExecutionSemester()));
        } else {
            if (information == null) {
                bean.reset();
            } else {
                bean.update(information);
            }
        }

        IViewState viewStateLoad = RenderUtils.getViewState("editVersionLoad");
        CompetenceCourseLoadBean load;
        if (viewStateLoad != null) {
            load = (CompetenceCourseLoadBean) viewStateLoad.getMetaObject().getObject();
        } else {
            if (information != null && information.getCompetenceCourseLoadsSet().size() > 0) {
                load = new CompetenceCourseLoadBean(information.getCompetenceCourseLoadsSet().iterator().next());
            } else if (period != null
                    && course.findCompetenceCourseInformationForExecutionPeriod(period).getCompetenceCourseLoadsSet().size() > 0) {
View Full Code Here

    }

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

        IViewState viewState = RenderUtils.getViewState("editVersion");
        if (viewState == null) {
            return prepareCreateVersion(mapping, form, request, response);
        }
        CompetenceCourseInformationRequestBean bean =
                (CompetenceCourseInformationRequestBean) viewState.getMetaObject().getObject();
        CompetenceCourseLoadBean load =
                (CompetenceCourseLoadBean) RenderUtils.getViewState("editVersionLoad").getMetaObject().getObject();
        CompetenceCourse course = bean.getCompetenceCourse();
        if (!course.isLoggedPersonAllowedToCreateChangeRequests(bean.getExecutionPeriod())) {
            addActionMessage(request, "error.cannot.create.request.in.chosen.semester");
View Full Code Here

TOP

Related Classes of pt.ist.fenixWebFramework.renderers.components.state.IViewState

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.