Package org.focusns.common.web.widget.mvc.support

Examples of org.focusns.common.web.widget.mvc.support.Navigator


            }
            //
            widgetRequest.setAttribute("requestType", "action");
            widgetRequest.setAttribute("widgetConfig", widgetConfig);
            //
            Navigator navigator = Navigator.reset();
            //
            for (WidgetActionInterceptor actionInterceptor : widgetActionInterceptors) {
                actionInterceptor.beforeAction(request, response);
            }
            widgetContext.getRequestDispatcher(actionPath).forward(widgetRequest, widgetResponse);
            //
            for (WidgetActionInterceptor actionInterceptor : widgetActionInterceptors) {
                actionInterceptor.afterAction(request, response);
            }
            //
            if (!StringUtils.hasText(navigator.getNavigateTo())) {
                widgetResponse.flushBuffer();
                return;
            }
            //
            String pathExpr = widgetConfig.getNavigationMap().get(navigator.getNavigateTo());
            if (StringUtils.hasText(pathExpr)) {
                Expression expression = expressionParser.parseExpression(pathExpr, ParserContext.TEMPLATE_EXPRESSION);
                EvaluationContext evaluationContext = createEvaluationContext();
                String path = (String) expression.getValue(evaluationContext, request);
                //
                request.getSession().setAttribute("redirectAttributes", navigator.getRedirectAttributes());
                response.sendRedirect(request.getContextPath() + path);
            }
            //
        } catch (Exception e) {
            log.error(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.focusns.common.web.widget.mvc.support.Navigator

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.