{
// schedule page render after current request handler is done. this can be
// overridden
// during invocation of listener
// method (i.e. by calling RequestCycle#setResponsePage)
RedirectPolicy policy = getPage().isPageStateless() ? RedirectPolicy.NEVER_REDIRECT
: RedirectPolicy.AUTO_REDIRECT;
requestCycle.scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(
new PageProvider(getPage()), policy));
}