1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package net.sf.tacos.javascript.dojo;
19
20 import org.apache.tapestry.IAsset;
21 import org.apache.tapestry.IRequestCycle;
22 import org.apache.tapestry.javascript.JavascriptManager;
23 import org.apache.tapestry.javascript.SimpleAjaxShellDelegate;
24
25
26
27
28
29
30
31 public class DojoOneShellDelegate extends SimpleAjaxShellDelegate {
32
33 public DojoOneShellDelegate(JavascriptManager javascriptManager) {
34 super(javascriptManager);
35 }
36
37 protected void processTapestryPath(StringBuffer str, IRequestCycle cycle, IAsset path) {
38 String tapestryUrl = cycle.getAbsoluteURL(path.buildURL());
39 String NEWLINE = "\n";
40 str.append(NEWLINE).append("<script type=\"text/javascript\">").append(NEWLINE)
41 .append("dojo.registerModulePath(\"tapestry\", \"")
42 .append(tapestryUrl).append("\");").append(NEWLINE);
43 str.append("</script>").append(NEWLINE);
44 }
45
46
47
48 }