mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
WebScript Runtime response/url model extended to support output of client-side webscript url generation function.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5902 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,8 @@ import java.io.Writer;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
|
||||
/**
|
||||
* HTTP Servlet Web Script Response
|
||||
*
|
||||
@@ -113,4 +115,13 @@ public class WebScriptServletResponse implements WebScriptResponse
|
||||
return url;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.scripts.WebScriptResponse#getEncodeScriptUrlFunction(java.lang.String)
|
||||
*/
|
||||
public String getEncodeScriptUrlFunction(String name)
|
||||
{
|
||||
return Utils.encodeJavascript(ENCODE_FUNCTION.replace("$name$", name));
|
||||
}
|
||||
|
||||
private static final String ENCODE_FUNCTION = "{ $name$: function(url) { return url; } }";
|
||||
}
|
||||
|
Reference in New Issue
Block a user