}
//
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);