Examples of IViewState


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

    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

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

        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

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

    }

    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

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

    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

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

        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

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

    }

    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

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

        }

        messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(domainException.getKey(), domainException.getArgs()));
        saveMessages(request, messages);

        IViewState viewState = RenderUtils.getViewState();

        if (viewState != null) {
            ViewDestination destination = viewState.getDestination("exception");

            if (destination != null) {
                return forwardForDestination(destination);
            }
        }
View Full Code Here

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

        return bundleMappings;
    }

    protected Object getObjectFromViewState(final String viewStateId) {
        IViewState viewState = RenderUtils.getViewState(viewStateId);
        return viewState == null ? null : viewState.getMetaObject().getObject();
    }
View Full Code Here

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

    @EntryPoint
    public ActionForward searchAlumni(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AlumniSearchBean searchBean;
        final IViewState viewState = RenderUtils.getViewState("searchAlumniBean");
        if (viewState != null) {
            searchBean = (AlumniSearchBean) viewState.getMetaObject().getObject();
        } else {
            searchBean = new AlumniSearchBean();
        }

        List<Registration> registrations = Alumni.readRegistrations(searchBean);
View Full Code Here

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

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

            final IViewState viewState = RenderUtils.getViewState("thesisProcessBean.edit.documents");
            if (!viewState.isValid()) {
                return juryReportFeedbackUploadInvalid(mapping, actionForm, request, response);
            }
            ExecuteProcessActivity.run(getProcess(request), JuryReporterFeedbackUpload.class, getThesisProcessBean());
            addSuccessMessage(request, "message.thesis.jury.report.feedback.uploaded.with.success");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.