* Populate the specified model with html import keys.
*
* @param model the model to populate with html import keys
*/
public void populateTemplateModel(Map<String, Object> model) {
LogService logger = ClickUtils.getLogService();
Object pop = model.put("headElements", new HeadElements());
if (pop != null && !page.isStateful()) {
String msg = page.getClass().getName() + " on " + page.getPath()
+ " model contains an object keyed with reserved "
+ "name \"headElements\". The page model object "
+ pop + " has been replaced with a PageImports object";
logger.warn(msg);
}
pop = model.put("jsElements", new JsElements());
if (pop != null && !page.isStateful()) {
String msg = page.getClass().getName() + " on " + page.getPath()
+ " model contains an object keyed with reserved "
+ "name \"jsElements\". The page model object "
+ pop + " has been replaced with a PageImports object";
logger.warn(msg);
}
// For backwards compatibility
pop = model.put("imports", new Imports());
if (pop != null && !page.isStateful()) {
String msg = page.getClass().getName() + " on " + page.getPath()
+ " model contains an object keyed with reserved "
+ "name \"imports\". The page model object "
+ pop + " has been replaced with a PageImports object";
logger.warn(msg);
}
// For backwards compatibility
pop = model.put("cssImports", new CssElements());
if (pop != null && !page.isStateful()) {
String msg = page.getClass().getName() + " on " + page.getPath()
+ " model contains an object keyed with reserved "
+ "name \"cssImports\". The page model object "
+ pop + " has been replaced with a PageImports object";
logger.warn(msg);
}
// For backwards compatibility
pop = model.put("jsImports", new JsElements());
if (pop != null && !page.isStateful()) {
String msg = page.getClass().getName() + " on " + page.getPath()
+ " model contains an object keyed with reserved "
+ "name \"jsImports\". The page model object "
+ pop + " has been replaced with a PageImports object";
logger.warn(msg);
}
}