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:
David Caruana
2007-05-29 09:32:04 +00:00
parent c3b15747fa
commit 3e0cee8351
50 changed files with 105 additions and 75 deletions

View File

@@ -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 + "'");