+ "the ajax response on the client.");
super.renderMergedOutputModel(model, request, response);
return;
}
BasicTilesContainer container = (BasicTilesContainer) ServletUtil.getCurrentContainer(request,
servletContext);
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));
TilesRequestContext tilesRequestContext = tilesRequestContextFactory.createRequestContext(
container.getApplicationContext(), new Object[] { request, response });
Definition compositeDefinition = container.getDefinitionsFactory().getDefinition(getUrl(),
tilesRequestContext);
Map<String, Attribute> flattenedAttributeMap = new HashMap<String, Attribute>();
flattenAttributeMap(container, tilesRequestContext, flattenedAttributeMap, compositeDefinition, request,
response);
addRuntimeAttributes(container, flattenedAttributeMap, request, response);
if (fragmentsToRender.length > 1) {
request.setAttribute(ServletUtil.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);
} else {
container.startContext(request, response).inheritCascadedAttributes(compositeDefinition);
container.render(attributeToRender, request, response);
container.endContext(request, response);
}
}
} else {
super.renderMergedOutputModel(model, request, response);
}