diff options
author | Artur <artur@vaadin.com> | 2017-04-24 12:04:15 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2017-04-24 11:04:15 +0200 |
commit | bb46fff4376095fb52443973577767026807a7ea (patch) | |
tree | 815dcd357f856174e52c21d554e1b1f9b98fad22 /client | |
parent | 70a3a105b22a01ee1114b40e50c18cdd5b194e50 (diff) | |
download | vaadin-framework-bb46fff4376095fb52443973577767026807a7ea.tar.gz vaadin-framework-bb46fff4376095fb52443973577767026807a7ea.zip |
Add support for frontend:// using separate es5 and es6 folders
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ApplicationConfiguration.java | 13 | ||||
-rw-r--r-- | client/src/main/java/com/vaadin/client/ApplicationConnection.java | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java index 14f9b34486..bf521a198c 100644 --- a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java +++ b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java @@ -238,6 +238,7 @@ public class ApplicationConfiguration implements EntryPoint { * always end with a slash (/). */ private String vaadinDirUrl; + private String frontendUrl; private String serviceUrl; private String contextRootUrl; private int uiId; @@ -339,6 +340,16 @@ public class ApplicationConfiguration implements EntryPoint { return vaadinDirUrl; } + /** + * Gets the URL of the that the {@literal frontend://} protocol should + * resolve to. + * + * @return the URL of the frontend protocol + */ + public String getFrontendUrl() { + return frontendUrl; + } + public void setAppId(String appId) { id = appId; } @@ -427,6 +438,8 @@ public class ApplicationConfiguration implements EntryPoint { .getConfigString(ApplicationConstants.CONTEXT_ROOT_URL); vaadinDirUrl = WidgetUtil.getAbsoluteUrl(jsoConfiguration .getConfigString(ApplicationConstants.VAADIN_DIR_URL)); + frontendUrl = WidgetUtil.getAbsoluteUrl(jsoConfiguration + .getConfigString(ApplicationConstants.FRONTEND_URL)); uiId = jsoConfiguration.getConfigInteger(UIConstants.UI_ID_PARAMETER) .intValue(); diff --git a/client/src/main/java/com/vaadin/client/ApplicationConnection.java b/client/src/main/java/com/vaadin/client/ApplicationConnection.java index e94195cd37..6f2a78a2d5 100644 --- a/client/src/main/java/com/vaadin/client/ApplicationConnection.java +++ b/client/src/main/java/com/vaadin/client/ApplicationConnection.java @@ -334,6 +334,13 @@ public class ApplicationConnection implements HasHandlers { protected String getContextRootUrl() { return getConfiguration().getContextRootUrl(); } + + @Override + protected String getFrontendUrl() { + String url = getConfiguration().getFrontendUrl(); + assert url.endsWith("/"); + return url; + } }; public static class MultiStepDuration extends Duration { |