2002/06/04 19:57:19
[org.ibex.core.git] / src / org / xwt / Template.java
index 0af2e0a..7ff09ce 100644 (file)
@@ -175,7 +175,7 @@ public class Template {
                 parent.putPrivately("$" + id, b, parentNodeName);
             }
 
-        if (script != null) {
+        if (script != null || (redirect != null && !"self".equals(redirect))) {
             pboxes.addElement(b);
             ptemplates.addElement(nodeName);
         }
@@ -329,6 +329,7 @@ public class Template {
             Scriptable s = Static.getStatic(nodeName);
             if (staticscript != null) {
                 Script temp = staticscript;
+                ((InterpretedScript)temp).setParentScope(s);     // so we know how to handle Static.get("xwt")
                 staticscript = null;
                 temp.exec(Context.enter(), s);
             }