}
public void render(PageContext pageContext, ComponentAttribute attr)
throws TilesException, IOException {
ComponentContext context = getComponentContext(pageContext);
TilesRequestContext request = getRequestContext(pageContext);
String type = calculateType(pageContext, attr);
if ("string".equalsIgnoreCase(type)) {
pageContext.getOut().print(attr.getValue());
return;
}
Map<String, ComponentAttribute> attrs = attr.getAttributes();
if (attrs != null) {
for (Map.Entry<String, ComponentAttribute> a : attrs.entrySet()) {
context.putAttribute(a.getKey(), a.getValue());
}
}
if (isDefinition(pageContext, attr)) {
render(request, attr.getValue().toString());
} else {
request.dispatch(attr.getValue().toString());
}
}