aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapolds <simonapold@gmail.com>2017-05-24 07:33:09 +0200
committerHenri Sara <henri.sara@gmail.com>2017-05-24 08:33:09 +0300
commit00adf36ec3502634a87419bd5485e1c883a98f21 (patch)
tree08c760464f2f7a04276432b7d67923888db69931
parentc7128c4c3e597724ff0ecf736b00877ea02de202 (diff)
downloadvaadin-framework-00adf36ec3502634a87419bd5485e1c883a98f21.tar.gz
vaadin-framework-00adf36ec3502634a87419bd5485e1c883a98f21.zip
Allow changing NavigationStateManager (#9410)
Unregister old NavigationStateManager before setting new one. Fixes #9406
-rw-r--r--server/src/main/java/com/vaadin/navigator/Navigator.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/navigator/Navigator.java b/server/src/main/java/com/vaadin/navigator/Navigator.java
index 83f1dbe739..567c271211 100644
--- a/server/src/main/java/com/vaadin/navigator/Navigator.java
+++ b/server/src/main/java/com/vaadin/navigator/Navigator.java
@@ -510,6 +510,10 @@ public class Navigator implements Serializable {
if (stateManager == null) {
stateManager = new UriFragmentManager(ui.getPage());
}
+ if (stateManager != null && this.stateManager != null
+ && stateManager != this.stateManager) {
+ this.stateManager.setNavigator(null);
+ }
this.stateManager = stateManager;
this.stateManager.setNavigator(this);
this.display = display;