当前位置: 首页>>代码示例>>Java>>正文


Java RenderUtils.getViewState方法代码示例

本文整理汇总了Java中pt.ist.fenixWebFramework.renderers.utils.RenderUtils.getViewState方法的典型用法代码示例。如果您正苦于以下问题:Java RenderUtils.getViewState方法的具体用法?Java RenderUtils.getViewState怎么用?Java RenderUtils.getViewState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pt.ist.fenixWebFramework.renderers.utils.RenderUtils的用法示例。


在下文中一共展示了RenderUtils.getViewState方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: submitJuryElementsDocument

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
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"));
        addSuccessMessage(request, "message.thesis.jury.elements.added.with.success");

    } catch (final DomainException e) {
        addErrorMessage(request, e.getMessage(), e.getArgs());
        RenderUtils.invalidateViewState("thesisProcessBean.edit.documents");
        return submitJuryElementsDocumentInvalid(mapping, actionForm, request, response);
    }

    return viewIndividualProgramProcess(request, getProcess(request));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:22,代码来源:PhdThesisProcessDA.java

示例2: searchPerson

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward searchPerson(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    final IViewState viewState = RenderUtils.getViewState("personBeanID");
    PersonBean personBean = (PersonBean) viewState.getMetaObject().getObject();

    SearchPerson.SearchParameters parameters =
            new SearchParameters(personBean.getName(), null, personBean.getUsername(), personBean.getDocumentIdNumber(),
                    null, null, null, null, null, null, null, (String) null);
    SearchPersonPredicate predicate = new SearchPerson.SearchPersonPredicate(parameters);

    CollectionPager<Person> persons = SearchPerson.runSearchPerson(parameters, predicate);

    request.setAttribute("resultPersons", persons.getCollection());
    request.setAttribute("personBean", personBean);
    return mapping.findForward("prepareSearchPerson");
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:18,代码来源:LoginsManagementDA.java

示例3: chooseSummaryType

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward chooseSummaryType(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    DynaActionForm dynaActionForm = (DynaActionForm) form;
    final IViewState viewState = RenderUtils.getViewState();
    SummariesManagementBean bean = (SummariesManagementBean) viewState.getMetaObject().getObject();

    bean.setShift(null);
    bean.setLesson(null);
    bean.setSummaryDate(null);
    bean.setSummaryRoom(null);
    bean.setSummaryTime(null);
    bean.setLessonType(null);

    if (bean.getSummaryType() != null && bean.getSummaryType().equals(SummaryType.EXTRA_SUMMARY)) {
        request.setAttribute("notShowLessonPlanningsAndSummaries", Boolean.TRUE);
    }

    return goToSummaryManagementPageAgain(mapping, request, dynaActionForm, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:21,代码来源:SummariesManagementDA.java

示例4: importLessonPlanningsBySummaries

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward importLessonPlanningsBySummaries(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws FenixServiceException {

    final IViewState viewState = RenderUtils.getViewState();
    ImportLessonPlanningsBean bean = (ImportLessonPlanningsBean) viewState.getMetaObject().getObject();

    ExecutionCourse executionCourseTo = bean.getExecutionCourseTo();
    Shift shiftFrom = bean.getShift();

    try {
        ImportLessonPlannings.runImportLessonPlannings(executionCourseTo.getExternalId(), executionCourseTo,
                shiftFrom.getExecutionCourse(), shiftFrom);
    } catch (DomainException e) {
        addActionMessage(request, e.getKey(), e.getArgs());
    }

    request.setAttribute("importLessonPlanningBean", bean);
    return lessonPlannings(mapping, form, request, response);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:20,代码来源:ManageExecutionCourseDA.java

示例5: juryReportFeedbackUpload

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
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");

    } catch (final DomainException e) {
        addErrorMessage(request, e.getMessage(), e.getArgs());
        return juryReportFeedbackUploadInvalid(mapping, actionForm, request, response);
    }

    return viewIndividualProgramProcess(request, getProcess(request));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:19,代码来源:CommonPhdThesisProcessDA.java

示例6: submitJuryElementsDocument

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward submitJuryElementsDocument(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
        HttpServletResponse response) {
    try {

        final IViewState viewState = RenderUtils.getViewState("thesisProcessBean.edit.documents");
        if (!viewState.isValid()) {
            return submitJuryElementsDocumentInvalid(mapping, actionForm, request, response);
        }
        ExecuteProcessActivity.run(getProcess(request), SubmitJuryElementsDocuments.class, getThesisProcessBean());
        addSuccessMessage(request, "message.thesis.jury.elements.added.with.success");

    } catch (final DomainException e) {
        addErrorMessage(request, e.getMessage(), e.getArgs());
        return submitJuryElementsDocumentInvalid(mapping, actionForm, request, response);
    }

    return viewIndividualProgramProcess(request, getProcess(request));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:19,代码来源:PhdThesisProcessDA.java

示例7: chooseLastSummary

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward chooseLastSummary(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    IViewState summaryViewState = RenderUtils.getViewState("summariesManagementBeanWithLastSummary");
    if (summaryViewState == null) {
        summaryViewState = RenderUtils.getViewState("summariesManagementBeanWithSummary");
    }

    SummariesManagementBean bean = (SummariesManagementBean) summaryViewState.getMetaObject().getObject();
    Summary lastSummary = bean.getLastSummary();
    if (lastSummary != null) {
        bean.setSummaryText(lastSummary.getSummaryText());
        bean.setTitle(lastSummary.getTitle());
        bean.setLessonPlanning(null);
    }

    return goToSummaryManagementPageAgain(mapping, request, (DynaActionForm) form, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:19,代码来源:SummariesManagementDA.java

示例8: chooseLesson

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward chooseLesson(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    final IViewState viewState = RenderUtils.getViewState("summariesManagementBeanWithLessons");
    SummariesManagementBean bean = (SummariesManagementBean) viewState.getMetaObject().getObject();

    bean.setSummaryDate(null);
    bean.setLessonType(null);

    Lesson lesson = bean.getLesson();
    if (lesson != null && lesson.getShift().getCourseLoadsSet().size() == 1) {
        bean.setLessonType(lesson.getShift().getCourseLoadsSet().iterator().next().getType());
    }

    return goToSummaryManagementPageAgain(mapping, request, (DynaActionForm) form, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:17,代码来源:SummariesManagementDA.java

示例9: showParkingPartyRequests

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward showParkingPartyRequests(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    IViewState viewState = RenderUtils.getViewState("searchPartyBean");
    SearchParkingPartyBean SearchParkingPartyBean = null;
    if (viewState != null) {
        SearchParkingPartyBean = (SearchParkingPartyBean) viewState.getMetaObject().getObject();
    }

    if (SearchParkingPartyBean != null) {
        SearchParkingPartyBean.setParty(null);

        List<Party> partyList =
                searchPartyCarPlate(SearchParkingPartyBean.getPartyName(), SearchParkingPartyBean.getCarPlateNumber(),
                        SearchParkingPartyBean.getParkingCardNumber());
        request.setAttribute("searchPartyBean", SearchParkingPartyBean);
        request.setAttribute("partyList", partyList);

    } else if (request.getParameter("partyID") != null || request.getAttribute("partyID") != null) {
        final String externalId = getPopertyID(request, "partyID");
        final String carPlateNumber = request.getParameter("plateNumber");
        final String parkingCardNumberString = request.getParameter("parkingCardNumber");
        Long parkingCardNumber = null;
        if (!org.apache.commons.lang.StringUtils.isEmpty(parkingCardNumberString)) {
            parkingCardNumber = new Long(parkingCardNumberString);
        }
        Party party = FenixFramework.getDomainObject(externalId);
        setupParkingRequests(request, party, carPlateNumber, parkingCardNumber);
    }

    return mapping.findForward("showParkingPartyRequests");
}
 
开发者ID:ist-dsi-archive,项目名称:fenix-parking,代码行数:33,代码来源:ParkingManagerDispatchAction.java

示例10: chooseDate

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward chooseDate(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    DynaActionForm dynaActionForm = (DynaActionForm) form;
    final IViewState viewState = RenderUtils.getViewState("summariesManagementBeanWithDate");
    SummariesManagementBean bean = (SummariesManagementBean) viewState.getMetaObject().getObject();
    return goToSummaryManagementPageAgain(mapping, request, dynaActionForm, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:9,代码来源:SummariesManagementDA.java

示例11: fillRequest

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private void fillRequest(HttpServletRequest request, Candidacy candidacy) {
    if (RenderUtils.getViewState("candidacyDocuments") != null) {
        RenderUtils.invalidateViewState("candidacyDocuments");
    }
    List<CandidacyDocumentUploadBean> candidacyDocuments = new ArrayList<CandidacyDocumentUploadBean>();
    for (CandidacyDocument candidacyDocument : candidacy.getCandidacyDocumentsSet()) {
        candidacyDocuments.add(new CandidacyDocumentUploadBean(candidacyDocument));
    }

    request.setAttribute("candidacyDocuments", candidacyDocuments);
    request.setAttribute("candidacy", candidacy);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:13,代码来源:ViewCandidaciesDispatchAction.java

示例12: goToInsertSummaryAgain

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward goToInsertSummaryAgain(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    DynaActionForm dynaActionForm = (DynaActionForm) form;
    final IViewState viewState = RenderUtils.getViewState();
    SummariesManagementBean bean = (SummariesManagementBean) viewState.getMetaObject().getObject();
    readAndSaveTeacher(bean, (DynaActionForm) form, request, mapping);
    return goToSummaryManagementPageAgain(mapping, request, dynaActionForm, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:10,代码来源:SummariesManagementDA.java

示例13: invalidateAndReloadView

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private void invalidateAndReloadView(HttpServletRequest request, String view) {
    final IViewState summaryViewState = RenderUtils.getViewState(view);
    SummariesManagementBean summaryBean = (SummariesManagementBean) summaryViewState.getMetaObject().getObject();
    if (summaryBean.getTitle().equals(new LocalizedString(I18N.getLocale(), "Not Taught."))) {
        summaryBean.setTitle(new LocalizedString(I18N.getLocale(), ""));
    }
    RenderUtils.invalidateViewState(view);
    request.setAttribute("summariesManagementBean", summaryBean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:10,代码来源:SummariesManagementDA.java

示例14: chooseLessonType

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public ActionForward chooseLessonType(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {

    final IViewState viewState = RenderUtils.getViewState("summariesManagementBeanWithLessonTypes");
    SummariesManagementBean bean = (SummariesManagementBean) viewState.getMetaObject().getObject();
    return goToSummaryManagementPageAgain(mapping, request, (DynaActionForm) form, bean);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:8,代码来源:SummariesManagementDA.java

示例15: getObjectFromViewState

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
protected Object getObjectFromViewState(final String viewStateId) {
    IViewState viewState = RenderUtils.getViewState(viewStateId);
    return viewState == null ? null : viewState.getMetaObject().getObject();
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:5,代码来源:FenixDispatchAction.java


注:本文中的pt.ist.fenixWebFramework.renderers.utils.RenderUtils.getViewState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。