return;
}
Request tilesRequest = createTilesRequest(request, response);
ApplicationContext tilesAppContext = tilesRequest.getApplicationContext();
BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(tilesAppContext);
if (container == null) {
throw new ServletException("Tiles container is not initialized. "
+ "Have you added a TilesConfigurer to your web application context?");
}
exposeModelAsRequestAttributes(model, request);
JstlUtils.exposeLocalizationContext(new RequestContext(request, servletContext));
Definition compositeDefinition = container.getDefinitionsFactory().getDefinition(getUrl(), tilesRequest);
Map<String, Attribute> flattenedAttributeMap = new HashMap<String, Attribute>();
flattenAttributeMap(container, tilesRequest, flattenedAttributeMap, compositeDefinition);
addRuntimeAttributes(container, tilesRequest, flattenedAttributeMap);
if (fragmentsToRender.length > 1) {
tilesRequest.getContext("request").put(ServletRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true);
}
for (String element : fragmentsToRender) {
Attribute attributeToRender = flattenedAttributeMap.get(element);
if (attributeToRender == null) {
throw new ServletException("No tiles attribute with a name of '" + element
+ "' could be found for the current view: " + this);
}
container.startContext(tilesRequest).inheritCascadedAttributes(compositeDefinition);
container.render(attributeToRender, tilesRequest);
container.endContext(tilesRequest);
}
} else {
super.renderMergedOutputModel(model, request, response);
}
}