fix scope bug in transaction handling
authorcrawshaw <crawshaw@ibex.org>
Sun, 5 Dec 2004 14:28:21 +0000 (14:28 +0000)
committercrawshaw <crawshaw@ibex.org>
Sun, 5 Dec 2004 14:28:21 +0000 (14:28 +0000)
darcs-hash:20041205142821-2eb37-51b9809edf96831bb7236548efc3d3b7d4f21e07.gz

src/java/org/ibex/xt/Servlet.java
src/java/org/ibex/xt/Template.java

index c53ae4f..71eedbb 100644 (file)
@@ -209,7 +209,6 @@ public class Servlet extends HttpServlet {
         public void put(Object key, Object val) throws JSExn {
             try {
             //#switch(JS.toString(key))
-            case "transaction":           transaction((JS)val);
             case "response.code":         response.setStatus(JS.toInt(val));
             case "response.redirect":     response.sendRedirect(JS.toString(val));
             case "response.contentType":  response.setContentType(JS.toString(val));
index 323fb00..6afe1b2 100644 (file)
@@ -235,7 +235,8 @@ public class Template extends JSLeaf.Element {
             StringReader sr = new StringReader(sw.toString());
 
             JS t;
-            try { t = JS.fromReader("input", 0, sr); }
+            try { t = JS.cloneWithNewParentScope(
+                        JS.fromReader("input", 0, sr), new JSScope(null)); }
             catch (IOException e) { throw new JSLeaf.Exn(e.getMessage()); }
 
             try {