本文整理了Java中org.apache.wicket.Request.getPage
方法的一些代码示例,展示了Request.getPage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getPage
方法的具体详情如下:
包路径:org.apache.wicket.Request
类名称:Request
方法名:getPage
暂无
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Redirects to intercept page using the page map for the current request
*
* @param interceptPage
* The intercept page to redirect to
*/
private void redirectToInterceptPage(final Page interceptPage)
{
final Page requestPage = RequestCycle.get().getRequest().getPage();
/*
* requestPage can be null if we throw the restart response exception before any page is
* instantiated in user's session. if this happens we switch to the pagemap of the
* interceptPage
*/
final IPageMap pageMap;
if (requestPage != null)
{
pageMap = requestPage.getPageMap();
}
else
{
pageMap = interceptPage.getPageMap();
}
pageMap.redirectToInterceptPage(interceptPage);
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Redirects to intercept page using the page map for the current request
*
* @param interceptPage
* The intercept page to redirect to
*/
private void redirectToInterceptPage(final Page interceptPage)
{
final Page requestPage = RequestCycle.get().getRequest().getPage();
/*
* requestPage can be null if we throw the restart response exception before any page is
* instantiated in user's session. if this happens we switch to the pagemap of the
* interceptPage
*/
final IPageMap pageMap;
if (requestPage != null)
{
pageMap = requestPage.getPageMap();
}
else
{
pageMap = interceptPage.getPageMap();
}
pageMap.redirectToInterceptPage(interceptPage);
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Redirects to intercept page using the page map for the current request
*
* @param interceptPageClass
* The intercept page class to redirect to
*/
private void redirectToInterceptPage(final Class interceptPageClass)
{
final RequestCycle cycle = RequestCycle.get();
final Page requestPage = cycle.getRequest().getPage();
/*
* requestPage can be null if we throw the restart response exception before any page is
* instantiated in user's session. if this happens we switch to the pagemap of the request.
*/
final IPageMap pageMap;
if (requestPage != null)
{
pageMap = requestPage.getPageMap();
}
else
{
RequestParameters parameters = cycle.getRequest().getRequestParameters();
pageMap = PageMap.forName(parameters.getPageMapName());
}
pageMap.redirectToInterceptPage(interceptPageClass);
}
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
final Page requestPage = cycle.getRequest().getPage();
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
private void setUpRedirect(final RequestCycle cycle)
{
Session session = Session.get();
if (session.isTemporary())
{
session.bind();
}
// The intercept continuation URL should be saved exactly as the
// original request specified.
// Only if it is an ajax request just redirect to the page where the request is from.
if (cycle.getRequest() instanceof WebRequest && ((WebRequest)cycle.getRequest()).isAjax())
{
interceptContinuationURL = cycle.urlFor(cycle.getRequest().getPage()).toString();
}
else
{
interceptContinuationURL = "/" + cycle.getRequest().getURL();
}
// Page map is dirty
dirty();
// Redirect to the page
cycle.setRedirect(true);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
private void setUpRedirect(final RequestCycle cycle)
{
Session session = Session.get();
if (session.isTemporary())
{
session.bind();
}
// The intercept continuation URL should be saved exactly as the
// original request specified.
// Only if it is an ajax request just redirect to the page where the request is from.
if (cycle.getRequest() instanceof WebRequest && ((WebRequest)cycle.getRequest()).isAjax())
{
interceptContinuationURL = cycle.urlFor(cycle.getRequest().getPage()).toString();
}
else
{
// wicket-2061: getURL() returns a properly <b>decoded</b> URL. But we need is a
// properly <b>encoded</b> URL.
interceptContinuationURL = "/" + cycle.getRequest().getURL();
interceptContinuationURL = WicketURLEncoder.FULL_PATH_INSTANCE.encode(interceptContinuationURL);
}
// Page map is dirty
dirty();
// Redirect to the page
cycle.setRedirect(true);
}
内容来源于网络,如有侵权,请联系作者删除!