summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-09-27 11:40:17 +0300
committerHenri Sara <henri.sara@gmail.com>2017-09-27 11:40:17 +0300
commit367c7751a6ff9234fd47bc5a48e6ef9a4117a7a2 (patch)
tree5b3849bafb37b49c3dcc8616e064f60bd081dff0 /client
parent69776b1d08d40bcdd89b9cc5b050e8db793ec06b (diff)
downloadvaadin-framework-367c7751a6ff9234fd47bc5a48e6ef9a4117a7a2.tar.gz
vaadin-framework-367c7751a6ff9234fd47bc5a48e6ef9a4117a7a2.zip
Add option to use PushState instead of URI fragments in Navigator (#10042)
* Navigator now by default uses pushState and normal URLs * added documentation for pushState and updated Navigator documentation * improving docs etc, adding one TODO to be solved before merging * pushState/replaceState no work better with changing titles * Making uri fragment navigator work when not using specially mapped UI * Revert to older default, add annotation for selecting * Fix tests, add null checks * Reorder if-clause, fix tests * Revert unnecessary test change * Use correct variable in UI, fix test clean up * Updates to JavaDocs, fix some methods and tests * Add comments, fix test ui, TODO for fallbacks * Navigation documentation, JavaDocs, removed TODOs * Documentation fixes * Improve JavaDocs * Fix link name in documentation * Improve throws declaration in getLocation * Change documentation about the PushState based navigation * Add since tags * Add since tags for UI
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
index 5618cabb19..44f0b4253a 100644
--- a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
@@ -439,12 +439,14 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
if (uidl.hasAttribute(UIConstants.ATTRIBUTE_PUSH_STATE)) {
- Browser.getWindow().getHistory().pushState(null, "",
+ Browser.getWindow().getHistory().pushState(null,
+ getState().pageState.title,
uidl.getStringAttribute(UIConstants.ATTRIBUTE_PUSH_STATE));
}
if (uidl.hasAttribute(UIConstants.ATTRIBUTE_REPLACE_STATE)) {
- Browser.getWindow().getHistory().replaceState(null, "", uidl
- .getStringAttribute(UIConstants.ATTRIBUTE_REPLACE_STATE));
+ Browser.getWindow().getHistory().replaceState(null,
+ getState().pageState.title, uidl.getStringAttribute(
+ UIConstants.ATTRIBUTE_REPLACE_STATE));
}
if (firstPaint) {