aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/navigator
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-08-31 13:57:37 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-08-31 14:03:04 +0300
commit61a1218d388b85b496e0fd98f2a5c5226ab4f83d (patch)
treef36fc84b66d6a285a59f50c141f821ec197362e9 /server/src/com/vaadin/navigator
parent7f343ebc78bec7391d64dfc942409b3dbaa5d914 (diff)
downloadvaadin-framework-61a1218d388b85b496e0fd98f2a5c5226ab4f83d.tar.gz
vaadin-framework-61a1218d388b85b496e0fd98f2a5c5226ab4f83d.zip
Change View.navigateTo(String) to View.enter(ViewChangeEvent) (#9055, #9056)
Diffstat (limited to 'server/src/com/vaadin/navigator')
-rw-r--r--server/src/com/vaadin/navigator/Navigator.java4
-rw-r--r--server/src/com/vaadin/navigator/View.java17
2 files changed, 12 insertions, 9 deletions
diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java
index 8332c0e45e..bda422379c 100644
--- a/server/src/com/vaadin/navigator/Navigator.java
+++ b/server/src/com/vaadin/navigator/Navigator.java
@@ -67,7 +67,7 @@ public class Navigator implements Serializable {
}
@Override
- public void navigateTo(String parameters) {
+ public void enter(ViewChangeEvent event) {
// nothing to do
}
}
@@ -483,7 +483,7 @@ public class Navigator implements Serializable {
}
}
- view.navigateTo(parameters);
+ view.enter(event);
currentView = view;
if (display != null) {
diff --git a/server/src/com/vaadin/navigator/View.java b/server/src/com/vaadin/navigator/View.java
index ffe9cfd0a9..53dbf01319 100644
--- a/server/src/com/vaadin/navigator/View.java
+++ b/server/src/com/vaadin/navigator/View.java
@@ -18,6 +18,7 @@ package com.vaadin.navigator;
import java.io.Serializable;
+import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.ui.Component;
/**
@@ -34,13 +35,15 @@ public interface View extends Serializable {
/**
* This view is navigated to.
*
- * This method is always called before the view is shown on screen. If there
- * is any additional id to data what should be shown in the view, it is also
- * optionally passed as parameter.
+ * This method is always called before the view is shown on screen.
+ * {@link ViewChangeEvent#getParameters() event.getParameters()} may contain
+ * extra parameters relevant to the view.
+ *
+ * @param event
+ * ViewChangeEvent representing the view change that is
+ * occurring. {@link ViewChangeEvent#getNewView()
+ * event.getNewView()} returns <code>this</code>.
*
- * @param parameters
- * parameters to the view or empty string if none given. This is
- * the string that appears e.g. in URI after "viewname/"
*/
- public void navigateTo(String parameters);
+ public void enter(ViewChangeEvent event);
} \ No newline at end of file