]> source.dussan.org Git - vaadin-framework.git/commitdiff
Cleaned a javascript temp variable from window. Added use warning to javadocs.
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Fri, 6 Nov 2009 17:46:52 +0000 (17:46 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Fri, 6 Nov 2009 17:46:52 +0000 (17:46 +0000)
svn changeset:9674/svn branch:6.2

src/com/vaadin/terminal/gwt/client/ui/VView.java
src/com/vaadin/ui/Window.java

index 162d5fa5d7ac2c37dc8f4a31dd1f98d4eebb7366..9cb108acda509415837f922103ce96242c82483b 100644 (file)
@@ -158,12 +158,12 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
     /*-{
       try {
          if (script == null) return;
-         $wnd.evalargs = args;
+         $wnd.vaadin.evalargs = args;
          if (args != null) 
              for (var i=1;i<= args.length;i++) 
-                script = script.replace("$"+i, "$wnd.evalargs["+(i-1)+"]");
+                script = script.replace("$"+i, "$wnd.vaadin.evalargs["+(i-1)+"]");
          eval(script);
-         $wnd.evalargs = null;
+         delete $wnd.vaadin.evalargs;
       } catch (e) {
       }
     }-*/;
index d8f4972104794b7250808e1c4c513f3240907a0a..23666dc28787f1841180fa70b2e8ce8d015383ec 100644 (file)
@@ -1667,6 +1667,14 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
      * </p>
      * 
      * <p>
+     * Use of this method should be avoided. Executing javascript often leads to
+     * cross-browser compatibility issues and regressions that are hard to
+     * resolve. Instead it is recommended to create new widgets with google web
+     * toolkit. For more info on creating own, reusable client-side widgets in
+     * Java, read corresponding chapter on Book of Vaadin.
+     * </p>
+     * 
+     * <p>
      * The script may contain markers indentified with "$x", where x is a one
      * digit number. The number of markers must match to the number of optional
      * Paintable reference parameters. The first marker is $1, second $2 and so