diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2014-03-19 17:29:45 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-03-31 08:39:15 +0000 |
commit | e4a50934a2cfb0e652b872376decf581bc0ab057 (patch) | |
tree | e7ea07ee5d1f13292ed6abcc9435c47892d8b10c /server/src/com/vaadin/annotations | |
parent | 7a91d29097e606a7e2dc4440443cb21ae7dfa61b (diff) | |
download | vaadin-framework-e4a50934a2cfb0e652b872376decf581bc0ab057.tar.gz vaadin-framework-e4a50934a2cfb0e652b872376decf581bc0ab057.zip |
Add reinit method for preserve-on-refresh UIs (#12191)
UI.reinit() is now called when an existing, preserved UI is shown after a
browser reload of the current page. The default implementation is empty.
The browser window size and location are up to date in UI.reinit();
window resize and URI fragment listeners, if any, will be called after
returning from UI.reinit().
Change-Id: Ie7aa670aaecf8e0e1510c91325b2a137b41263af
Diffstat (limited to 'server/src/com/vaadin/annotations')
-rw-r--r-- | server/src/com/vaadin/annotations/PreserveOnRefresh.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/annotations/PreserveOnRefresh.java b/server/src/com/vaadin/annotations/PreserveOnRefresh.java index 0b503b8c3f..801c1e78f2 100644 --- a/server/src/com/vaadin/annotations/PreserveOnRefresh.java +++ b/server/src/com/vaadin/annotations/PreserveOnRefresh.java @@ -22,6 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import com.vaadin.server.UIProvider; +import com.vaadin.ui.UI; /** * Marks a UI that should be retained when the user refreshed the browser @@ -30,6 +31,10 @@ import com.vaadin.server.UIProvider; * adding this annotation to a UI class, the framework will instead reuse the * current UI instance when a reload is detected. * <p> + * Whenever a request is received that reloads a preserved UI, the UI's + * {@link UI#reinit(com.vaadin.server.VaadinRequest) reinit} method is invoked + * by the framework. + * <p> * By using * {@link UIProvider#isPreservedOnRefresh(com.vaadin.server.UICreateEvent)}, the * decision can also be made dynamically based on other parameters than only |