// already finished (initPage could complete the response...
// i.e. during a redirect).
if ((def != null) && !context.getResponseComplete()) {
// Ensure that our Resources are available
Iterator<Resource> it = def.getResources().iterator();
Resource resource = null;
while (it.hasNext()) {
resource = it.next();
// Just calling getResource() puts it in the Request scope
resource.getFactory().getResource(context, resource);
}
// Get the Tree and pre-walk it
if (LayoutDefinitionManager.isDebug(context)) {
// Make sure to reset all the client ids we're about to check