*/
protected <C extends Page> Page newPage(final Class<C> pageClass,
final RequestCycle requestCycle)
{
// Construct a new instance using the default page factory
IPageFactory pageFactory = requestCycle.getApplication()
.getSessionSettings()
.getPageFactory();
if (pageParameters == null || pageParameters.size() == 0)
{
return pageFactory.newPage(pageClass);
}
else
{
// Add bookmarkable params in for WICKET-400.
final Map<String, String[]> requestMap = requestCycle.getRequest().getParameterMap();
requestMap.putAll(pageParameters.toRequestParameters());
return pageFactory.newPage(pageClass, pageParameters);
}
}