if (!(obj instanceof ViewRenderer)) {
logger.error("Named view renderer was not an instance of a ViewRenderer");
return;
}
ViewRenderer vr = (ViewRenderer) obj;
// render the response
try {
/*
* Note, this is our own framework response and just javascript
* that calls a javascript routine in another window, passing
* Unicode String values in a map.
* For now, we're setting the content type, but this may be a
* problem for people who whant to control the encoding and the
* content type themselves, as with a JSP.
* If so, then they can implement their own Command to handle the
* ViewRenderer objects.
*/
response.setContentType("text/html; charset=UTF-8");
vr.renderView(request, response, servletContext);
request.removeAttribute(PageFlowConstants.VIEW_RENDERER_ATTRIBUTE_NAME);
}
catch (IOException ioe) {
logger.error("Named view renderer was not able to render. Cause: " + ioe, ioe);
}