mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Web Scripts:
- filename convention changed from _ to . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5793 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,7 +53,7 @@ public class DeclarativeWebScript extends AbstractWebScript
|
||||
// Logger
|
||||
private static final Log logger = LogFactory.getLog(DeclarativeWebScript.class);
|
||||
|
||||
private String baseTemplatePath;
|
||||
private String basePath;
|
||||
private ScriptLocation executeScript;
|
||||
|
||||
|
||||
@@ -64,10 +64,10 @@ public class DeclarativeWebScript extends AbstractWebScript
|
||||
public void init(WebScriptRegistry apiRegistry)
|
||||
{
|
||||
super.init(apiRegistry);
|
||||
baseTemplatePath = getDescription().getId().replace('.', '/');
|
||||
basePath = getDescription().getId();
|
||||
|
||||
// Test for "execute" script
|
||||
String scriptPath = baseTemplatePath + ".js";
|
||||
String scriptPath = basePath + ".js";
|
||||
executeScript = getWebScriptRegistry().getScriptProcessor().findScript(scriptPath);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public class DeclarativeWebScript extends AbstractWebScript
|
||||
final protected void renderFormatTemplate(String format, Map<String, Object> model, Writer writer)
|
||||
{
|
||||
format = (format == null) ? "" : format;
|
||||
String templatePath = baseTemplatePath + "_" + format + ".ftl";
|
||||
String templatePath = basePath + "." + format + ".ftl";
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Rendering template '" + templatePath + "'");
|
||||
|
Reference in New Issue
Block a user