use of org.apache.wicket.core.request.handler.IPageRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode8.
/**
*/
@Test(expected = StalePageException.class)
public void decode8() {
Url url = Url.parse("wicket/page?4-6.5-a-b-c");
context.setNextPageRenderCount(8);
IRequestHandler handler = encoder.mapRequest(getRequest(url));
((IPageRequestHandler) handler).getPage();
}
use of org.apache.wicket.core.request.handler.IPageRequestHandler in project wicket by apache.
the class DefaultExceptionMapper method extractCurrentPage.
/**
* @return the page being rendered when the exception was thrown, or {@code null} if it cannot
* be extracted
*/
protected Page extractCurrentPage() {
final RequestCycle requestCycle = RequestCycle.get();
IRequestHandler handler = requestCycle.getActiveRequestHandler();
if (handler == null) {
handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
}
if (handler instanceof IPageRequestHandler) {
IPageRequestHandler pageRequestHandler = (IPageRequestHandler) handler;
return (Page) pageRequestHandler.getPage();
}
return null;
}
use of org.apache.wicket.core.request.handler.IPageRequestHandler in project wicket-orientdb by OrienteerBAP.
the class OrientDefaultExceptionsHandlingListener method extractCurrentPage.
private Page extractCurrentPage(boolean fullSearch) {
final RequestCycle requestCycle = RequestCycle.get();
IRequestHandler handler = requestCycle.getActiveRequestHandler();
if (handler == null) {
handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
if (handler == null && fullSearch) {
handler = OrientDbWebApplication.get().getRootRequestMapper().mapRequest(requestCycle.getRequest());
}
}
if (handler instanceof IPageRequestHandler) {
IPageRequestHandler pageRequestHandler = (IPageRequestHandler) handler;
return (Page) pageRequestHandler.getPage();
}
return null;
}
Aggregations