/** * <p>Construct a new instance with the specified values.</p> * * @param name Name of this forward * @param path Path to which control should be forwarded or * redirected * @param redirect Should we do a redirect? * @param module Module prefix, if any */ public ActionForward(String name, String path, boolean redirect, String module) { super(); setName(name); setPath(path); setRedirect(redirect); setModule(module); }
/** * Gets an inquirable impl from the impl service name parameter. Then calls lookup service to retrieve the record from the * key/value parameters. Finally gets a list of Rows from the inquirable */ public ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { InquiryForm inquiryForm = (InquiryForm) form; if (inquiryForm.getBusinessObjectClassName() == null) { LOG.error("Business object name not given."); throw new RuntimeException("Business object name not given."); } Class boClass = Class.forName(inquiryForm.getBusinessObjectClassName()); ModuleService responsibleModuleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(boClass); if(responsibleModuleService!=null && responsibleModuleService.isExternalizable(boClass)){ String redirectUrl = responsibleModuleService.getExternalizableBusinessObjectInquiryUrl(boClass, (Map<String, String[]>) request.getParameterMap()); ActionForward redirectingActionForward = new RedirectingActionForward(redirectUrl); redirectingActionForward.setModule("/"); return redirectingActionForward; } return continueWithInquiry(mapping, form, request, response); }
private ActionForward forwardForDestination(ViewDestination destination) { ActionForward forward = new ActionForward(); forward.setModule(destination.getModule()); forward.setPath(destination.getPath()); forward.setRedirect(destination.getRedirect()); return forward; }
actionForward.setModule("/"); actionForward.setPath(redirectTo); actionForward.setRedirect(true);
forward.setPath("/home.do"); forward.setRedirect(true); forward.setModule("/");