if (hasRequest) {
parentBinding = (TemplateVariableBinding) request.getAttribute(GrailsApplicationAttributes.PAGE_SCOPE);
if (parentBinding == null) {
if (webRequest != null) {
parentBinding = new TemplateVariableBinding(new WebRequestTemplateVariableBinding(webRequest));
parentBinding.setRoot(true);
newParentCreated = true;
}
}
}