Fixing problem PageController where it didn't go to the specified template. NIHVIVO-632

This commit is contained in:
bdc34 2010-12-22 15:22:08 +00:00
parent 1569743afc
commit 769637111d

View file

@ -70,9 +70,13 @@ public class PageController extends FreemarkerHttpServlet{
}
private String getTemplate(Map<String, Object> mapForTemplate) {
if( mapForTemplate.containsKey("bodyTemplate"))
return (String) mapForTemplate.get("bodyTemplate");
else
if( mapForTemplate.containsKey("page") ){
Map page = (Map) mapForTemplate.get("page");
if( page != null && page.containsKey("bodyTemplate"))
return (String) page.get("bodyTemplate");
else
return DEFAULT_BODY_TEMPLATE;
}else
return DEFAULT_BODY_TEMPLATE;
}