]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #949
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 1 Oct 2007 18:05:46 +0000 (18:05 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 1 Oct 2007 18:05:46 +0000 (18:05 +0000)
svn changeset:2405/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java

index a47b0fe73ce3fba6e204fabd7f4319c6ae95d584..29ecf576523c0d822fcdf0d53ccc3402e2ed598c 100644 (file)
@@ -94,7 +94,6 @@ public class ICustomLayout extends ComplexPanel implements Paintable, Container
 
                // Update PID
                pid = uidl.getId();
-
                if(!hasTemplate()) {
                        // Update HTML template only once
                        initializeHTML(uidl, client);
@@ -115,6 +114,12 @@ public class ICustomLayout extends ComplexPanel implements Paintable, Container
                                }
                        }
                }
+               
+               // Evaluate scripts only once
+               if (scripts != null) {
+                       eval(scripts);
+                       scripts = null;
+               }
        }
 
        /** Initialize HTML-layout. */
@@ -177,16 +182,6 @@ public class ICustomLayout extends ComplexPanel implements Paintable, Container
         return elem.getAttribute("location");
         }-*/;
 
-       /** Scripts are evaluated when the document has been rendered */
-       protected void onLoad() {
-               super.onLoad();
-               // Evaluate scripts only once
-               if (scripts != null) {
-                       eval(scripts);
-                       scripts = null;
-               }
-       }
-
        /** Evaluate given script in browser document */
        private static native void eval(String script) /*-{
         try {