log.warning("-------detail no cache -----");
News obj = NewsModel.getById(alias);
if (obj != null) {
CategoryModel cateModel = new CategoryModel();
cateModel.prepareAll();
TagModel tagModel = new TagModel();
tagModel.prepareList();
CompiledScript compiledscript = CompileScriptEngine
.getCompileScript(config.getApplicationId(),
"detail", template.getDetail());
Bindings bind = compiledscript.getEngine().getBindings(
ScriptContext.ENGINE_SCOPE);
bind.put("title_for_layout", config.getTitle());
bind.put("description_for_layout",
config.getDescription());
bind.put("keyword_for_layout", config.getKeyword());
bind.put("css_for_layout", template.getCss());
bind.put("js_for_layout", template.getJs());
RecentViewHelper.addRecentView(obj);
bind.put("recent_view",
RecentViewHelper.getRecentView());
bind.put("list_tag", tagModel.getListResult());
bind.put("list_category", cateModel.getListResult());
bind.put("article", obj);
try {
String result = (String) compiledscript.eval();
treeCache.put(alias, result);