]> source.dussan.org Git - vaadin-framework.git/commitdiff
removed lot of globals and refactored some components to work w/o them
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 27 Feb 2007 14:19:55 +0000 (14:19 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 27 Feb 2007 14:19:55 +0000 (14:19 +0000)
svn changeset:755/svn branch:toolkit

src/com/itmill/toolkit/terminal/web/ApplicationServlet.java

index 35c805e3e2151b269a6a0e622ee14278912a5e0d..968ef9bf1ba43a99d354c18814c85ca6170c5a0f 100644 (file)
@@ -876,7 +876,7 @@ public class ApplicationServlet extends HttpServlet implements
                        appUrl += (i>0?"/":"") + urlParts[i];
                if (appUrl.endsWith("/")) appUrl = appUrl.substring(0,appUrl.length()-1);
                page
-                               .write("var client = new itmill.Client("
+                               .write("itmill.tmp = new itmill.Client("
                                                + "document.getElementById('ajax-window'),"
                                                + "\""
                                                + appUrl 
@@ -901,12 +901,13 @@ public class ApplicationServlet extends HttpServlet implements
                        page.write(" (new " + themeObjName + "(\""
                                        + resourcePath
                                        + t.getName()
-                                       + "/\")).registerTo(client);\n");
+                                       + "/\")).registerTo(itmill.tmp);\n");
                //}
 
                if (isDebugMode(unhandledParameters))
-                       page.write("client.debugEnabled =true;\n");
-               page.write("client.start();\n");
+                       page.write("itmill.tmp.debugEnabled =true;\n");
+               page.write("itmill.tmp.start();\n");
+               page.write("delete itmill.tmp;\n");
 
                page.write("</script>\n");