summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-09-23 16:51:42 +0300
committerVaadin Code Review <review@vaadin.com>2013-09-27 10:33:10 +0000
commita5795f346e077268eb77edef09d902fba57d5804 (patch)
treec33ff81d236ff3fce1c0f2c93b61a58dda9be917 /client
parent649735f755c51e5c11d5ebe984e7a308fe97552a (diff)
downloadvaadin-framework-a5795f346e077268eb77edef09d902fba57d5804.tar.gz
vaadin-framework-a5795f346e077268eb77edef09d902fba57d5804.zip
Prefixes GET parameters in Liferay with portlet namespace #12602
Change-Id: I9939a7af83482e136ed0d146accdeec0cd9f10ea
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java17
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java2
2 files changed, 18 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index da8f521799..7a70080c7e 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -246,6 +246,23 @@ public class ApplicationConfiguration implements EntryPoint {
ApplicationConstants.SERVICE_URL_PATH_AS_PARAMETER) == Boolean.TRUE;
}
+ /**
+ * Return the name of the parameter used to to send data to the service url.
+ * This method should only be called if {@link #useServiceUrlPathParam()} is
+ * true.
+ *
+ * @since 7.1.6
+ * @return The parameter name, by default <code>v-resourcePath</code>
+ */
+ public String getServiceUrlParameterName() {
+ String prefix = getJsoConfiguration(id).getConfigString(
+ ApplicationConstants.SERVICE_URL_PARAMETER_NAMESPACE);
+ if (prefix == null) {
+ prefix = "";
+ }
+ return prefix + ApplicationConstants.V_RESOURCE_PATH;
+ }
+
public String getRootPanelId() {
return id;
}
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 0d9c859ee8..4314602bc2 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -2994,7 +2994,7 @@ public class ApplicationConnection {
if (!path.startsWith("/")) {
path = '/' + path;
}
- String pathParam = ApplicationConstants.V_RESOURCE_PATH + "="
+ String pathParam = conf.getServiceUrlParameterName() + "="
+ URL.encodeQueryString(path);
serviceUrl = addGetParameters(serviceUrl, pathParam);
uidlUri = serviceUrl;