Add support for spring:eval JSP tag
Issue: SWF-1462
This commit is contained in:
@@ -20,13 +20,14 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.webflow.context.ExternalContext;
|
||||
import org.springframework.webflow.execution.RequestContext;
|
||||
import org.springframework.webflow.mvc.view.AbstractMvcView;
|
||||
|
||||
/**
|
||||
* The Spring Web Servlet MVC view implementation.
|
||||
*
|
||||
*
|
||||
* @author Keith Donald
|
||||
*/
|
||||
public class ServletMvcView extends AbstractMvcView {
|
||||
@@ -47,6 +48,10 @@ public class ServletMvcView extends AbstractMvcView {
|
||||
HttpServletResponse response = (HttpServletResponse) externalContext.getNativeResponse();
|
||||
request.setAttribute(org.springframework.web.servlet.support.RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE,
|
||||
context.getActiveFlow().getApplicationContext());
|
||||
// spring:eval tag
|
||||
if (getConversionService() != null) {
|
||||
request.setAttribute(ConversionService.class.getName(), getConversionService().getDelegateConversionService());
|
||||
}
|
||||
getView().render(model, request, response);
|
||||
}
|
||||
|
||||
|
||||
@@ -284,6 +284,13 @@ public abstract class AbstractMvcView implements View {
|
||||
return view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the configured ConversionService
|
||||
*/
|
||||
protected ConversionService getConversionService() {
|
||||
return conversionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method subclasses should override to execute the view rendering logic.
|
||||
* @param model the view model data
|
||||
|
||||
Reference in New Issue
Block a user