diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-01-04 19:07:34 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-01-04 19:07:34 +0200 |
commit | b3e2adea172482c7cb682aaa30b51f4900c8bf2a (patch) | |
tree | 2f20f89e3dfb3260fdb7970a1445cd8b176c854c /WebContent/VAADIN/vaadinBootstrap.js | |
parent | 8e04f2383db71a33f185636558fee77e98dbd18d (diff) | |
download | vaadin-framework-b3e2adea172482c7cb682aaa30b51f4900c8bf2a.tar.gz vaadin-framework-b3e2adea172482c7cb682aaa30b51f4900c8bf2a.zip |
Pass initial request details through the browser (#8232)
By passing the details through the browser, we don't need any state
mapped to a rootId that could be sent multiple times by caching in the
browser
Old test updated to test for this
Diffstat (limited to 'WebContent/VAADIN/vaadinBootstrap.js')
-rw-r--r-- | WebContent/VAADIN/vaadinBootstrap.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index 1de61917b8..1f5f3fa973 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -100,9 +100,15 @@ url += '/'; } } - // Root id url += ((/\?/).test(url) ? "&" : "?") + "browserDetails"; - url += '&rootId=' + getConfig('rootId'); + var rootId = getConfig("rootId"); + if (rootId !== undefined) { + url += "&rootId=" + rootId; + } + + url += '&initialPath=' + encodeURIComponent(getConfig("initialPath")); + url += '&initialParams=' + encodeURIComponent(JSON.stringify(getConfig("initialParams"))); + url += '&' + vaadin.getBrowserDetailsParameters(appId); // Timestamp to avoid caching @@ -122,7 +128,6 @@ config[property] = updatedConfig[property]; } } - config.initPending = false; // Try bootstrapping again, this time without fetching missing info bootstrapApp(false); @@ -143,8 +148,7 @@ apps[appId] = app; if (!window.name) { - var rootId = getConfig('rootId'); - window.name = appId + '-' + rootId; + window.name = appId + '-' + Math.random(); } var bootstrapApp = function(mayDefer) { @@ -155,12 +159,11 @@ var widgetsetBase = getConfig('widgetsetBase'); var widgetset = getConfig('widgetset'); - var initPending = getConfig('initPending'); if (widgetset && widgetsetBase) { loadWidgetset(widgetsetBase, widgetset); } - if (initPending) { + if (getConfig('uidl') === undefined) { if (mayDefer) { fetchRootConfig(); } else { |