本文整理汇总了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));
}
示例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");
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}