aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/navigator
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-10-04 18:21:03 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-10-05 14:10:03 +0300
commite80c00ebd8f2c72f197074c4d1192d702539c8d0 (patch)
treea955befdc9e7fa65bd80467256b7b1318823657a /server/src/com/vaadin/navigator
parentff4ee18e0f26515cfa818ab9d249932a3bbf0955 (diff)
downloadvaadin-framework-e80c00ebd8f2c72f197074c4d1192d702539c8d0.tar.gz
vaadin-framework-e80c00ebd8f2c72f197074c4d1192d702539c8d0.zip
Add Page.getLocation() (#9249)
* Send the whole window location, not just fragment, in bootstrap and when the fragment changes * BrowserDetails now has URI getLocation() instead of String getUriFragment() * Keep FragmentChangeListeners as-is, should perhaps change to LocationChangeListeners at some point * Implement Page.getFragment() by means of Page.getLocation() * Differentiate between no fragment (null) and empty fragment ("") as java.net.URI does Change-Id: I1da1ea0664304d0c121a57e85d127fe48605e940
Diffstat (limited to 'server/src/com/vaadin/navigator')
-rw-r--r--server/src/com/vaadin/navigator/Navigator.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java
index df9e5059fa..e4704bce6a 100644
--- a/server/src/com/vaadin/navigator/Navigator.java
+++ b/server/src/com/vaadin/navigator/Navigator.java
@@ -109,10 +109,10 @@ public class Navigator implements Serializable {
@Override
public String getState() {
String fragment = getFragment();
- if (fragment.startsWith("!")) {
- return fragment.substring(1);
- } else {
+ if (fragment == null || !fragment.startsWith("!")) {
return "";
+ } else {
+ return fragment.substring(1);
}
}