diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-08-31 13:57:37 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-08-31 14:03:04 +0300 |
commit | 61a1218d388b85b496e0fd98f2a5c5226ab4f83d (patch) | |
tree | f36fc84b66d6a285a59f50c141f821ec197362e9 /server/src/com/vaadin/navigator | |
parent | 7f343ebc78bec7391d64dfc942409b3dbaa5d914 (diff) | |
download | vaadin-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.java | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/navigator/View.java | 17 |
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 |