if (!addResource.requiresBuffer())
{
//If the response is buffered, addResource instance takes
//the responsability of render this script.
AutoscrollBodyScript autoscrollBodyScript = (AutoscrollBodyScript)
context.getApplication().createComponent(context,
AutoscrollBodyScript.COMPONENT_TYPE,
AutoscrollBodyScript.DEFAULT_RENDERER_TYPE);
autoscrollBodyScript.setId(BODY_SCRIPT_COMPONENT_ID);
autoscrollBodyScript.setTransient(true);
autoscrollBodyScript.getAttributes().put(
JSFAttr.TARGET_ATTR,
TomahawkResourceUtils.BODY_LOCATION);
viewToRender.addComponentResource(context, autoscrollBodyScript);
}