本文整理了Java中org.apache.wicket.request.Request.cloneWithUrl
方法的一些代码示例,展示了Request.cloneWithUrl
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.cloneWithUrl
方法的具体详情如下:
包路径:org.apache.wicket.request.Request
类名称:Request
方法名:cloneWithUrl
[英]Returns request with specified URL and same POST parameters as this request.
[中]返回具有指定URL和与此请求相同的POST参数的请求。
代码示例来源:origin: apache/wicket
/**
* @see org.apache.wicket.request.IRequestMapper#mapRequest(org.apache.wicket.request.Request)
*/
@Override
public IRequestHandler mapRequest(final Request request)
{
Url url = request.getUrl();
if (escapeSequence.get() != null)
{
for (int i = 0; i < url.getSegments().size(); i++)
{
if (url.getSegments().get(i).equals(escapeSequence.get()))
{
url.getSegments().set(i, "..");
}
}
}
return chain.mapRequest(request.cloneWithUrl(url));
}
代码示例来源:origin: org.apache.wicket/wicket-request
/**
* @see org.apache.wicket.request.IRequestMapper#mapRequest(org.apache.wicket.request.Request)
*/
@Override
public IRequestHandler mapRequest(final Request request)
{
Url url = request.getUrl();
if (escapeSequence.get() != null)
{
for (int i = 0; i < url.getSegments().size(); i++)
{
if (url.getSegments().get(i).equals(escapeSequence.get()))
{
url.getSegments().set(i, "..");
}
}
}
return chain.mapRequest(request.cloneWithUrl(url));
}
代码示例来源:origin: org.apache.wicket/wicket-core
/**
* {@inheritDoc}
* <p>
* This implementation decrypts the URL and passes the decrypted URL to the wrapped mapper.
* </p>
* @param request
* The request for which to get a compatibility score.
*
* @return The compatibility score.
*/
@Override
public int getCompatibilityScore(final Request request)
{
Url decryptedUrl = decryptUrl(request, request.getUrl());
if (decryptedUrl == null)
{
return 0;
}
Request decryptedRequest = request.cloneWithUrl(decryptedUrl);
return wrappedMapper.getCompatibilityScore(decryptedRequest);
}
代码示例来源:origin: apache/wicket
/**
* {@inheritDoc}
* <p>
* This implementation decrypts the URL and passes the decrypted URL to the wrapped mapper.
* </p>
* @param request
* The request for which to get a compatibility score.
*
* @return The compatibility score.
*/
@Override
public int getCompatibilityScore(final Request request)
{
Url decryptedUrl = decryptUrl(request, request.getUrl());
if (decryptedUrl == null)
{
return 0;
}
Request decryptedRequest = request.cloneWithUrl(decryptedUrl);
return wrappedMapper.getCompatibilityScore(decryptedRequest);
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
public IRequestHandler mapRequest(final Request request)
{
Url url = decryptUrl(request, request.getUrl());
if (url == null)
{
return null;
}
Request decryptedRequest = request.cloneWithUrl(url);
IRequestHandler handler = wrappedMapper.mapRequest(decryptedRequest);
if (handler != null)
{
handler = new RequestSettingRequestHandler(decryptedRequest, handler);
}
return handler;
}
代码示例来源:origin: org.wicketstuff/wicketstuff-minis
IRequestHandler mapRequest = mountedMapper.mapRequest(request.cloneWithUrl(url));
if (mapRequest == null)
mapRequest = mountedMapper.mapRequest(request.cloneWithUrl(url));
代码示例来源:origin: apache/wicket
@Override
public IRequestHandler mapRequest(final Request request)
{
Url url = decryptUrl(request, request.getUrl());
if (url == null)
{
return null;
}
Request decryptedRequest = request.cloneWithUrl(url);
IRequestHandler handler = wrappedMapper.mapRequest(decryptedRequest);
if (handler != null)
{
handler = new RequestSettingRequestHandler(decryptedRequest, handler);
}
return handler;
}
代码示例来源:origin: org.apache.wicket/wicket-core
Request requestWithoutPageSegment = request.cloneWithUrl(urlWithoutPageSegment);
PageParameters pageParameters = extractPageParameters(requestWithoutPageSegment, urlWithoutPageSegment);
代码示例来源:origin: apache/wicket
Request requestWithoutPageSegment = request.cloneWithUrl(urlWithoutPageSegment);
PageParameters pageParameters = extractPageParameters(requestWithoutPageSegment, urlWithoutPageSegment);
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
public int getCompatibilityScore(Request request)
{
Url originalUrl = new Url(request.getUrl());
PageParameters parameters = extractPageParameters(request, mountSegments.length, parametersEncoder);
if (parameters != null)
{
parameters.setLocale(resolveLocale());
}
removeCachingDecoration(originalUrl, parameters);
Request requestWithoutDecoration = request.cloneWithUrl(originalUrl);
int score = super.getCompatibilityScore(requestWithoutDecoration);
if (score > 0)
{
score--; // pages always have priority over resources
}
else
{
score = -1;
}
return score;
}
代码示例来源:origin: apache/wicket
@Override
public int getCompatibilityScore(Request request)
{
Url originalUrl = new Url(request.getUrl());
PageParameters parameters = extractPageParameters(request, mountSegments.length, parametersEncoder);
if (parameters != null)
{
parameters.setLocale(resolveLocale());
}
removeCachingDecoration(originalUrl, parameters);
Request requestWithoutDecoration = request.cloneWithUrl(originalUrl);
int score = super.getCompatibilityScore(requestWithoutDecoration);
if (score > 0)
{
score--; // pages always have priority over resources
}
else
{
score = -1;
}
return score;
}
内容来源于网络,如有侵权,请联系作者删除!