From: Joonas Lehtinen Date: Mon, 1 Oct 2007 18:05:46 +0000 (+0000) Subject: Fixes #949 X-Git-Tag: 6.7.0.beta1~5935 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1daef1c2e935e49a54ed1d74325c0cc227da7e1d;p=vaadin-framework.git Fixes #949 svn changeset:2405/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java index a47b0fe73c..29ecf57652 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ICustomLayout.java @@ -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 {