- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getPath()
方法的一些代码示例,展示了WebUtilities.getPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebUtilities.getPath()
方法的具体详情如下:
包路径:com.github.bordertech.wcomponents.WebUtilities
类名称:WebUtilities
方法名:getPath
[英]Adds GET parameters to a path.
[中]将GET参数添加到路径。
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Adds GET parameters to a path.
*
* @param url the existing url path
* @param parameters are put into the URL as get parameters.
* @return the complete url eg http://localhost/app?step=1
*/
public static String getPath(final String url, final Map<String, String> parameters) {
return getPath(url, parameters, false);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* {@inheritDoc}
*/
@Override
public String getPostPath() {
if (windowId == null) {
return backing.getPostPath();
} else {
Map<String, String> parameters = new HashMap<>();
parameters.put(WWindow.WWINDOW_REQUEST_PARAM_KEY, windowId);
String url = getWServletPath();
return WebUtilities.getPath(url, parameters, true);
}
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* @return the URL which can be used to target this resource.
*/
public String getTargetUrl() {
UIContext uic = UIContextHolder.getCurrent();
if (uic == null) {
return null;
}
String url = uic.getEnvironment().getWServletPath();
Map<String, String> parameters = new HashMap<>();
String resourceCacheKey = InternalResourceMap.getResourceCacheKey(resourceName);
parameters.put(WServlet.STATIC_RESOURCE_PARAM_NAME, resourceName);
if (resourceCacheKey != null) {
parameters.put("cacheKey", resourceCacheKey);
}
return WebUtilities.getPath(url, parameters, true);
}
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Returns a dynamic URL that this wwindow component can be accessed from.
*
* @return the URL to access this wwindow component.
*/
public String getUrl() {
Environment env = getEnvironment();
Map<String, String> parameters = env.getHiddenParameters();
parameters.put(WWINDOW_REQUEST_PARAM_KEY, getId());
// Override the step count with WWindow step
parameters.put(Environment.STEP_VARIABLE, String.valueOf(getStep()));
String url = env.getWServletPath();
return WebUtilities.getPath(url, parameters, true);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates a dynamic URL that the poster can be loaded from. In fact the URL points to the main application servlet,
* but includes a non-null for the parameter associated with this WComponent (ie, its label). The handleRequest
* method below detects this when the browser requests a file.
*
* @return the url to load the poster from, or null if there is no poster defined.
*/
public String getPosterUrl() {
Image poster = getComponentModel().poster;
if (poster == null) {
return null;
}
// this variable needs to be set in the portlet environment.
String url = getEnvironment().getWServletPath();
Map<String, String> parameters = getBaseParameterMap();
parameters.put(POSTER_REQUEST_PARAM_KEY, "x");
return WebUtilities.getPath(url, parameters, true);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates dynamic URLs that the video clips can be loaded from. In fact the URL points to the main application
* servlet, but includes a non-null for the parameter associated with this WComponent (ie, its label). The
* handleRequest method below detects this when the browser requests a file.
*
* @return the urls to load the video files from, or null if there are no clips defined.
*/
public String[] getVideoUrls() {
Video[] video = getVideo();
if (video == null || video.length == 0) {
return null;
}
String[] urls = new String[video.length];
// this variable needs to be set in the portlet environment.
String url = getEnvironment().getWServletPath();
Map<String, String> parameters = getBaseParameterMap();
for (int i = 0; i < urls.length; i++) {
parameters.put(VIDEO_INDEX_REQUEST_PARAM_KEY, String.valueOf(i));
urls[i] = WebUtilities.getPath(url, parameters, true);
}
return urls;
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
/**
* Creates dynamic URLs that the video clips can be loaded from. In fact the URL points to the main application
* servlet, but includes a non-null for the parameter associated with this WComponent (ie, its label). The
* handleRequest method below detects this when the browser requests a file.
*
* @return the urls to load the video files from, or null if there are no clips defined.
*/
public String[] getTrackUrls() {
Track[] tracks = getTracks();
if (tracks == null || tracks.length == 0) {
return null;
}
String[] urls = new String[tracks.length];
// this variable needs to be set in the portlet environment.
String url = getEnvironment().getWServletPath();
Map<String, String> parameters = getBaseParameterMap();
for (int i = 0; i < urls.length; i++) {
parameters.put(TRACK_INDEX_REQUEST_PARAM_KEY, String.valueOf(i));
urls[i] = WebUtilities.getPath(url, parameters, true);
}
return urls;
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testGetPath() {
// Simple case
String url = "/foo";
String expected = "/foo";
Assert.assertEquals("Incorrect path returned for " + url, expected, WebUtilities.
getPath(url, null));
// Simple case with one param
Map<String, String> params = new HashMap<>();
params.put("a", "b");
url = "/foo";
expected = "/foo?a=b";
Assert.assertEquals("Incorrect path returned for " + url + " with a=b", expected,
WebUtilities.getPath(url, params));
// Case with existing params and two in the map
params = new HashMap<>();
params.put("c", "d");
params.put("e", "f");
url = "/foo?a=b";
expected = "/foo?a=b&c=d&e=f";
assertURLEquals(expected, WebUtilities.getPath(url, params), "&");
// As a javascript url
expected = "/foo?a=b&c=d&e=f";
assertURLEquals(expected, WebUtilities.getPath(url, params, true), "&");
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
urls[i] = WebUtilities.getPath(url, parameters, true);
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
return WebUtilities.getPath(url, parameters, true);
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
return WebUtilities.getPath(url, parameters, true);
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
return WebUtilities.getPath(url, parameters, true);
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
return WebUtilities.getPath(url, parameters, true);
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
return WebUtilities.getPath(url, parameters, true);
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities类的一些代码示例,展示了WebUtilities类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.github.bordertech.wcomponents.WText类的一些代码示例,展示了WText类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getParentNamingContext()方法的一些代码示例,展示了WebUti
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.render()方法的一些代码示例,展示了WebUtilities.render()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getContextForComponent()方法的一些代码示例,展示了WebUti
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.doubleEncodeBrackets()方法的一些代码示例,展示了WebUtili
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.percentEncodeUrl()方法的一些代码示例,展示了WebUtilities
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getPath()方法的一些代码示例,展示了WebUtilities.getPath(
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getClosestOfClass()方法的一些代码示例,展示了WebUtilitie
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.renderWithTransformToHTML()方法的一些代码示例,展示了Web
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.doubleDecodeBrackets()方法的一些代码示例,展示了WebUtili
本文整理了Java中com.github.bordertech.wcomponents.WText.setEncodeText()方法的一些代码示例,展示了WText.setEncodeText()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.escapeForUrl()方法的一些代码示例,展示了WebUtilities.esc
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.encode()方法的一些代码示例,展示了WebUtilities.encode()的
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getComponentById()方法的一些代码示例,展示了WebUtilities
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.generateRandom()方法的一些代码示例,展示了WebUtilities.g
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getProjectVersion()方法的一些代码示例,展示了WebUtilitie
本文整理了Java中com.github.bordertech.wcomponents.WText.getData()方法的一些代码示例,展示了WText.getData()的具体用法。这些代码示例主
本文整理了Java中com.github.bordertech.wcomponents.WText.getParent()方法的一些代码示例,展示了WText.getParent()的具体用法。这些代
本文整理了Java中com.github.bordertech.wcomponents.WebUtilities.getAncestorOfClass()方法的一些代码示例,展示了WebUtiliti
我是一名优秀的程序员,十分优秀!