/** {@inheritDoc} */
public void render(Attribute attr, Request request)
throws IOException {
if (attr == null) {
throw new CannotRenderException("Cannot render a null attribute");
}
if (attr.isPermitted(request)) {
Renderer renderer = rendererFactory.getRenderer(attr.getRenderer());
Object value = evaluate(attr, request);
if (!(value instanceof String)) {
throw new CannotRenderException(
"Cannot render an attribute that is not a string, toString returns: "
+ value);
}
renderer.render((String) value, request);
}