private void renderDefinition(TilesContainer container,
String definitionName, String template, String templateType,
String templateExpression, String role, String preparer,
boolean flush, Request request) throws IOException {
try {
AttributeContext attributeContext = container
.getAttributeContext(request);
Attribute templateAttribute = Attribute.createTemplateAttribute(template,
templateExpression, templateType, role);
attributeContext.setPreparer(preparer);
attributeContext.setTemplateAttribute(templateAttribute);
container.render(definitionName, request);
if (flush) {
request.getWriter().flush();
}
} finally {