use of org.craftercms.engine.exception.RenderingException in project engine by craftercms.
the class CrafterPageView method renderActualView.
protected void renderActualView(String pageViewName, Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
View actualView = delegatedViewResolver.resolveViewName(pageViewName, locale);
if (actualView == null) {
throw new RenderingException("No view was resolved for page view name '" + pageViewName + "'");
}
if (actualView instanceof AbstractView) {
((AbstractView) actualView).setContentType(getContentType());
}
actualView.render(model, request, response);
}
use of org.craftercms.engine.exception.RenderingException in project engine by craftercms.
the class UserAgentAwareCrafterPageView method renderActualView.
@Override
protected void renderActualView(String pageViewName, Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
String userAgentSpecificPageViewName = userAgentTemplateDetector.resolveAgentTemplate(request, pageViewName);
View actualView = delegatedViewResolver.resolveViewName(userAgentSpecificPageViewName, locale);
if (actualView == null) {
actualView = delegatedViewResolver.resolveViewName(pageViewName, locale);
if (actualView == null) {
throw new RenderingException("No view was resolved for page view name '" + pageViewName + "'");
}
}
actualView.render(model, request, response);
}
Aggregations