public ActionForward prepareSendMail(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { return mapping.getInputForward(); } }
public ActionForward action(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { //do some stuff return mapping.getInputForward(); //return to the caller }
public ActionForward getInputForward() { return mapping.getInputForward(); }
public ActionForward doMethod(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { return mapping.getInputForward(); }
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MyForm theForm = (MyForm) form; String name = theForm.getName(); if (name == null || "".equals(name)) { // error case; name is required // do something } if(getErrors(request) == null ||getErrors(request).size() == 0) return mapping.findForward("success"); else return mapping.getInputForward(); }
protected ActionForward setError(HttpServletRequest request, ActionMapping mapping, String errorMessage, String forwardPage, Object... actionArg) { addErrorMessage(request, errorMessage, errorMessage, actionArg); if (forwardPage != null) { return mapping.findForward(forwardPage); } return mapping.getInputForward(); }
public ActionForward prepareStartViewWarning(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { request.setAttribute("executionSemesterID", request.getParameter("executionSemesterID")); if (getAndSetRegistration(request) == null) { addActionMessage(request, "errors.impossible.operation"); return mapping.getInputForward(); } else { return mapping.findForward("prepareEnrollmentViewWarning"); } }
private ActionForward readExecutionDegree(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, String findForward) { final DynaActionForm form = (DynaActionForm) actionForm; final String executionDegreeID = (String) form.get("executionDegreeID"); if (!StringUtils.isEmpty(executionDegreeID)) { final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeID); request.setAttribute("executionDegree", executionDegree); return mapping.findForward(findForward); } else { return mapping.getInputForward(); } }
public ActionForward add(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { final InfoClass infoClass = (InfoClass) request.getAttribute(PresentationConstants.CLASS_VIEW); final DynaActionForm addShiftsForm = (DynaActionForm) form; List<String> selectedShifts = Arrays.asList((String[]) addShiftsForm.get("selectedItems")); try { AddShiftsToSchoolClass.run(infoClass, selectedShifts); } catch (ExistingServiceException ex) { // No problem, the user refreshed the page after adding classes request.setAttribute("selectMultipleItemsForm", null); return mapping.getInputForward(); } return mapping.findForward("EditClass"); }
public ActionForward prepareSearchSendMailInvalid(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("bean", RenderUtils.getViewState().getMetaObject().getObject()); return mapping.getInputForward(); }
public ActionForward prepareSearchMarkSheetInvalid(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("edit", RenderUtils.getViewState().getMetaObject().getObject()); return mapping.getInputForward(); }
public ActionForward chooseExecutionDegreeInvalid(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("executionDegreeBean", RenderUtils.getViewState().getMetaObject().getObject()); return mapping.getInputForward(); }
private ActionForward searchMarkSheets(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, MarkSheetManagementSearchBean searchBean) throws FenixServiceException { ActionMessages actionMessages = createActionMessages(); try { Map<EvaluationSeason, MarkSheetSearchResultBean> result = SearchMarkSheets.run(searchBean); request.setAttribute("edit", searchBean); request.setAttribute("searchResult", result); request.setAttribute("url", buildSearchUrl(searchBean)); } catch (InvalidArgumentsServiceException e) { addMessage(request, actionMessages, e.getMessage()); } return mapping.getInputForward(); }
public ActionForward readCoordinators(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { final DynaActionForm form = (DynaActionForm) actionForm; final String executionDegreeID = (String) form.get("executionDegreeID"); if (!StringUtils.isEmpty(executionDegreeID)) { final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeID); request.setAttribute("executionDegree", executionDegree); setResponsibleCoordinatorsIDs(executionDegree, form); return mapping.findForward("manageCoordinators"); } else { return mapping.getInputForward(); } }
public ActionForward prepareSearchMarkSheetPostBack(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { Object object = RenderUtils.getViewState().getMetaObject().getObject(); RenderUtils.invalidateViewState(); request.setAttribute("edit", object); return mapping.getInputForward(); }
public ActionForward prepareStartViewWarning(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (getAndSetRegistration(request) == null) { addActionMessage(request, "errors.impossible.operation"); return mapping.getInputForward(); } else { return start(mapping, form, request, response); } }
public ActionForward prepareStartViewWarning(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (getAndSetRegistration(request) == null) { addActionMessage(request, "errors.impossible.operation"); return mapping.getInputForward(); } else { return mapping.findForward("prepareEnrollmentViewWarning"); } }
public ActionForward prepareSearchSendMailPostBack(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { final MarkSheetSendMailBean bean = getRenderedObject(); bean.setMarkSheetToConfirmSendMailBean(null); bean.setGradesToSubmitExecutionCourseSendMailBean(null); RenderUtils.invalidateViewState(); request.setAttribute("bean", bean); return mapping.getInputForward(); }
public ActionForward prepareStartViewWarning(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String executionSemesterID = (String) getFromRequest(request, "executionSemesterID"); if (!StringUtils.isEmpty(executionSemesterID)) { request.setAttribute("executionSemesterID", executionSemesterID); } else { request.setAttribute("executionSemesterID", ExecutionSemester.readActualExecutionSemester().getExternalId()); } if (getAndSetRegistration(request) == null) { addActionMessage(request, "errors.impossible.operation"); return mapping.getInputForward(); } else { return mapping.findForward("prepareEnrollmentViewWarning"); } }
@Override public ActionForward execute(Exception ex, ExceptionConfig exceptionConfig, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws ServletException { ActionForward forward = mapping.getInputForward(); if (ex instanceof DomainException) { super.execute(ex, exceptionConfig, mapping, actionForm, request, response); DomainException domainException = (DomainException) ex; String property = domainException.getKey(); ActionMessage error = new ActionMessage(domainException.getKey(), domainException.getArgs()); super.storeException(request, property, error, forward, exceptionConfig.getScope()); } return forward; }