Refine search
public ActionForward goToEditDegree(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) { String degreeId = request.getParameter("degreeId"); return new FenixActionForward(request, new ActionForward("/curricularPlans/editDegree.faces?degreeId=" + degreeId, false)); }
/** * <p> Renders the reference for a HTML <base> element. </p> */ public String getBaseRef() { if (request == null) { return null; } StringBuffer result = RequestUtils.requestToServerStringBuffer(request); String path; if (forward == null) { path = request.getRequestURI(); } else { path = request.getContextPath() + forward.getPath(); } result.append(path); return result.toString(); }
/** * Find an action forward for given application view. If no suitable forward is found in the action mapping using * the view name as a key, this method will create a new action forward using the view name. * @param forward the application view to find a forward for * @param mapping the action mapping to use * @return the action forward, never null */ protected ActionForward findForward(ApplicationView forward, ActionMapping mapping) { // note that this method is always creating a new ActionForward to make // sure that the redirect flag is false -- redirect is controlled by SWF // itself, not Struts ActionForward actionForward = mapping.findForward(forward.getViewName()); if (actionForward != null) { // the 1.2.1 copy constructor would ideally be better to // use, but it is not Struts 1.1 compatible actionForward = new ActionForward(actionForward.getName(), actionForward.getPath(), false); } else { actionForward = new ActionForward(forward.getViewName(), false); } return actionForward; } }
/** * <p>Construct a new instance based on the values of another * ActionForward.</p> * * @param copyMe An ActionForward instance to copy * @since Struts 1.2.1 */ public ActionForward(ActionForward copyMe) { this(copyMe.getName(), copyMe.getPath(), copyMe.getRedirect(), copyMe.getModule()); } }
ActionForward originalForward = a_mapping.findForward ("Success"); String path = originalForward.getPath() + "?multitablesId=WeeklyDeliveryInstances-Count&name=WeeklyDeliveryInstances-Count&type=excel"; ActionForward forward = new ActionForward(path); forward.setRedirect(true); return (forward);
public ActionForward findForward(String name) { ActionForward actionForward = new ActionForward(); actionForward.setName(name); actionForward.setPath("/" + name + ".html"); return actionForward; }
LeavePayoutForm btf = (LeavePayoutForm) form; List<LeaveBlock> eligiblePayouts = (List<LeaveBlock>) request.getSession().getAttribute("eligibilities"); if(!eligiblePayouts.isEmpty()) { String leaveCalendarDocumentId = request.getParameter("documentId"); ActionForward forward = new ActionForward(mapping.findForward("basic")); LeaveCalendarDocument lcd = LmServiceLocator.getLeaveCalendarService().getLeaveCalendarDocument(leaveCalendarDocumentId); if(StringUtils.equals(accrualRule.getMaxBalanceActionFrequency(),HrConstants.MAX_BAL_ACTION_FREQ.LEAVE_APPROVE) || StringUtils.equals(accrualRule.getMaxBalanceActionFrequency(), HrConstants.MAX_BAL_ACTION_FREQ.YEAR_END)) { ActionForward loseForward = new ActionForward(mapping.findForward("leaveCalendarPayoutSuccess")); loseForward.setPath(loseForward.getPath()+"?documentId="+leaveCalendarDocumentId+"&action=R&methodToCall=approveLeaveCalendar"); return loseForward; LOG.error("could not initialize balance transfer."); GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, "couldnot.initialize.baltransfer"); return mapping.findForward("basic");
final String scpID = request.getParameter("scpID"); final String executionPeriodId = request.getParameter("executionPeriodId"); final String redirectTo = GenericChecksumRewriter.injectChecksumInUrl(request.getContextPath(), builder.toString(), request.getSession(false)); final ActionForward actionForward = new ActionForward(); actionForward.setModule("/"); actionForward.setPath(redirectTo); actionForward.setRedirect(true);
URLCodec urlCodec; if (Strings.isNotEmpty(message)) saveErrors(request.getSession(), ForwardSupport.buildMessages(new String[] { message })); buf = action.getURL(request); urlCodec = new URLCodec("UTF-8"); if (null == prefixes || prefixes.length <= 0) { if (log.isDebugEnabled()) log.debug("redirect:" + buf.toString()); return new ActionForward(buf.toString(), true); } else { Iterator iter = request.getParameterMap().keySet().iterator(); while (iter.hasNext()) { String key = (String) iter.next(); if (i >= prefixes.length) break; /* Loop/switch isn't completed */ if (key.startsWith(prefixes[i])) { String value = request.getParameter(key); if (Strings.isNotEmpty(value)) buf.append("&").append(key).append("=").append(urlCodec.encode(value)); return new ActionForward(buf.toString(), true);
if (LOG.isTraceEnabled()) { String lm=String.format("ENTRY %s%n%s", form.getClass().getSimpleName(), request.getRequestURI()); LOG.trace(lm); request.setAttribute(TEXT_AREA_FIELD_NAME, keyValue[0]); request.setAttribute(FORM_ACTION,keyValue[1]); request.setAttribute(TEXT_AREA_FIELD_LABEL,keyValue[2]); request.setAttribute(TEXT_AREA_READ_ONLY,keyValue[3]); request.setAttribute(KRADConstants.DOC_FORM_KEY, GlobalVariables.getUserSession().addObjectWithGeneratedKey(form)); ActionForward forward=mapping.findForward(FORWARD_TEXT_AREA_UPDATE); String lm=String.format("EXIT %s", (forward==null)?"null":forward.getPath()); LOG.trace(lm);
request.getRequestURI()); LOG.trace(lm); String forwardingId=request.getParameter(FORWARD_NEXT); if (forwardingId == null) { forwardingId=RiceConstants.MAPPING_BASIC; ActionForward forward=mapping.findForward(forwardingId); String lm=String.format("EXIT %s", (forward==null)?"null":forward.getPath()); LOG.trace(lm);
PathQuery pathQuery = new PathQuery(model); pathQuery.addView("Employee.name"); ActionMapping mapping = new ActionMapping(); AddColumnAction action = new AddColumnAction(); List<Path> columnsPath = new ArrayList<Path>(); ForwardConfig conf = new ActionForward(); conf.setName("results"); conf.setPath("thataway"); mapping.addForwardConfig(conf); expect(request.getParameter("columnToAdd")).andReturn("Employee.age"); expect(request.getSession()).andReturn(session).times(2); expect(request.getParameter("table")).andReturn("y"); expect(request.getParameter("trail")).andReturn("zoom"); expect(session.getAttribute("TABLE_MAP")).andReturn(tableMap); assertEquals("thataway?table=y&page=0&trail=zoom", fwd.getPath());
throws Exception { String page = request.getParameter("page"); String prefix = request.getParameter("prefix"); getServlet().getServletContext()); if (request.getAttribute(Globals.MODULE_KEY) == null) { String message = messages.getMessage("switch.prefix", prefix); return (new ActionForward(page));
@Override public String getPath() { String current = super.getPath(); String mark = ""; if (current.indexOf("?") == -1) { mark = "?"; } String amp = ""; if (mark.length() == 0) { amp = "&"; } String module = getPathModule(); String context = request.getContextPath(); String checksum = GenericChecksumRewriter.calculateChecksum(context + module + current, request.getSession(false)); return String.format("%s%s%s%s=%s", current, mark, amp, GenericChecksumRewriter.CHECKSUM_ATTRIBUTE_NAME, checksum); }
@Override public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ManageExecutionCourseDA.propageContextIds(request); String executionCourseId = (String) request.getAttribute("executionCourseID"); request.setAttribute("module", "/teacher"); request.setAttribute("contextPrefix", "/executionCourseForumManagement.do?executionCourseID=" + executionCourseId); request.setAttribute("executionCourseId", executionCourseId); ActionForward forward = super.execute(mapping, actionForm, request, response); return ManageExecutionCourseDA.forward(request, forward.getPath()); }
public ActionForward deleteSSTOLeaveBlock(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { BalanceTransferForm btf = (BalanceTransferForm) form; buildBalanceTransferForLeaveBlock(btf, request.getParameter("leaveBlockId")); return new ActionForward(mapping.findForward("basic")); }
return mapping.findForward(RiceConstants.MODULE_LOCKED_MAPPING); ((KualiForm) form).setAnchor(getImageContext(request, KRADConstants.ANCHOR)); else if (StringUtils.isNotBlank(request.getParameter(KRADConstants.ANCHOR))) { ((KualiForm) form).setAnchor(request.getParameter(KRADConstants.ANCHOR)); if ( returnForward!=null && returnForward.getRedirect() && returnForward.getName()!=null && returnForward.getName().equals(KRADConstants.KRAD_INITIATED_DOCUMENT_VIEW_NAME)) { return returnForward;
@Override public ActionForward performLookup(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // parse out the business object name from our methodToCall parameter String fullParameter = (String) request.getAttribute(KFSConstants.METHOD_TO_CALL_ATTRIBUTE); String boClassName = StringUtils.substringBetween(fullParameter, KFSConstants.METHOD_TO_CALL_BOPARM_LEFT_DEL, KFSConstants.METHOD_TO_CALL_BOPARM_RIGHT_DEL); if (!StringUtils.equals(boClassName, GeneralLedgerPendingEntry.class.getName())) { return super.performLookup(mapping, form, request, response); } String path = super.performLookup(mapping, form, request, response).getPath(); path = path.replaceFirst(KFSConstants.LOOKUP_ACTION, KFSConstants.GL_MODIFIED_INQUIRY_ACTION); return new ActionForward(path, true); }
private ActionForward doForward(HttpServletRequest request, String path) { request.setAttribute("teacher$actual$page", path); return new ActionForward("/evaluation/evaluationFrame.jsp"); }
protected ActionForward redirect(HttpServletRequest request, Action action, String message) throws Exception { if (Strings.isNotEmpty(message)) saveErrors(request.getSession(), ForwardSupport.buildMessages(new String[] { message })); return new ActionForward(action.getURL(request).toString(), true); }