diff options
author | Henri Sara <henri.sara@itmill.com> | 2012-05-24 13:16:02 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2012-05-24 13:16:02 +0000 |
commit | 20ba0f58a0649702cfa5442d7c192c74d03b6a36 (patch) | |
tree | d65ec31160165bd978ea50fa93ecfd234ab8df10 /src/com/vaadin | |
parent | ce78aaeb78cf7e48e91a8e76ecb5f48531baea6c (diff) | |
download | vaadin-framework-20ba0f58a0649702cfa5442d7c192c74d03b6a36.tar.gz vaadin-framework-20ba0f58a0649702cfa5442d7c192c74d03b6a36.zip |
Manual merge from 6.7 to 6.8 for #8799 timer unregistration.
svn changeset:23825/svn branch:6.8
Diffstat (limited to 'src/com/vaadin')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VView.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index 350c4b206b..6fdacc9607 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -136,7 +136,14 @@ public class VView extends SimplePanel implements Container, ResizeHandler, // should not be in the document focus flow getElement().setTabIndex(-1); TouchScrollDelegate.enableTouchScrolling(this, getElement()); + } + /** + * Start to periodically monitor for parent element resizes if embedded + * application (e.g. portlet). + */ + protected void onLoad() { + super.onLoad(); if (isMonitoringParentSize()) { resizeTimer = new Timer() { @Override @@ -152,6 +159,18 @@ public class VView extends SimplePanel implements Container, ResizeHandler, } /** + * Stop monitoring for parent element resizes. + */ + @Override + protected void onUnload() { + if (resizeTimer != null) { + resizeTimer.cancel(); + resizeTimer = null; + } + super.onUnload(); + } + + /** * Called when the window or parent div might have been resized. * * This immediately checks the sizes of the window and the parent div (if |