主题 : 程序问题 |
级别: 解元
|
1# 发表于:2011-10-06 20:06:37 IP:219.58.*.*
|
||||
---|---|---|---|---|---|
级别: 总版主
|
2# 发表于:2011-10-07 08:37:14 IP:220.14.*.*
好的,我们已经记录下来,提交给了技术部门,如果的确有问题的话,我们会在下个版本修复该问题。感谢您的支持。
|
||
---|---|---|---|
级别: 解元
|
3# 发表于:2011-10-07 21:00:31 IP:111.169.*.*
FrontUtils.includeTpl(TPL_STYLE_LIST, site, env)应为:
FrontUtils.includeTpl(listStyle, site, env) |
||
---|---|---|---|
级别: 解元
|
4# 发表于:2011-10-07 21:06:29 IP:111.169.*.*
FrontUtils.includeTpl(TPL_STYLE_LIST, site, env)应为:
FrontUtils.includeTpl(listStyle, site, env) 路径返回: "/WEB-INF/t/cms/www/red/style_list/"+listStyle+ " .html" 而TPL_STYLE_LIST = "/WEB-INF/t/cms_sys_defined/style_list/style_"; 所以出现错误。 分析:这是“userDefined” case ,没有人用到这种模板,一般都用“sysdefned”,但程序不能有问题。 |
||
---|---|---|---|
级别: 解元
|
5# 发表于:2011-10-07 21:08:17 IP:111.169.*.*
很感谢jeecms,我正在研究你们的源代码,原先我研究了jeecms2.4。
我的邮箱为:smn8899@163.com |
||
---|---|---|---|
级别: 解元
|
6# 发表于:2011-10-07 21:15:30 IP:111.169.*.*
实际上:
InvokeType type = DirectiveUtils.getInvokeType(params); ... if (InvokeType.sysDefined == type) { if (StringUtils.isBlank(listStyle)) { throw new ParamsRequiredException(PARAM_STYLE_LIST); } env.include(TPL_STYLE_LIST + listStyle + TPL_SUFFIX, UTF8, true); } else if (InvokeType.userDefined == type) { if (StringUtils.isBlank(listStyle)) { throw new ParamsRequiredException(PARAM_STYLE_LIST); } FrontUtils.includeTpl(TPL_STYLE_LIST, site, env); } else if (InvokeType.custom == type) { FrontUtils.includeTpl(TPL_NAME, site, params, env); } else if (InvokeType.body == type) { body.render(env.getOut()); } else { throw new RuntimeException("invoke type not handled: " + type); } 在很多地方都用到,不必在每个程序都写,应组合到一个共享类中,因为错一个地方,好多地方都错,修改起来麻烦。或者该方法体中userdefined custom 意识差不多,可删掉usedefined |
||
---|---|---|---|
1
共1页