Package org.springmodules.xt.ajax.action

Examples of org.springmodules.xt.ajax.action.RedirectAction


    private static final Logger logger = Logger.getLogger(AjaxRedirectSender.class);
   
    public static void sendRedirect(HttpServletResponse httpResponse, String redirectUrl, Map model) throws IOException {
        logger.debug(new StringBuilder("Sending ajax redirect: ").append(redirectUrl));
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
        ajaxResponse.addAction(new RedirectAction(redirectUrl, (Map) null));
        AjaxResponseSender.sendResponse(httpResponse, ajaxResponse);
    }
View Full Code Here


    }
   
    private void redirectToView(String view, HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) throws IOException {
        // Creating Ajax redirect action:
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
        AjaxAction ajaxAction = new RedirectAction(new StringBuilder(request.getContextPath()).append(view).toString(), modelAndView);
        ajaxResponse.addAction(ajaxAction);
        // Need to clear the ModelAndView because we are handling the response by ourselves:
        modelAndView.clear();
        AjaxResponseSender.sendResponse(response, ajaxResponse);
    }
View Full Code Here

        } else {
            model.put(this.exceptionMessageAttribute, ex.getClass());
        }
        // Create the response with the redirect action:
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
        AjaxAction ajaxRedirect = new RedirectAction(new StringBuilder(request.getContextPath()).append(this.redirectUrl).toString(), model);
        ajaxResponse.addAction(ajaxRedirect);
        return ajaxResponse;
    }
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.action.RedirectAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.