// check if the found page match the required class
if ((page != null) && page.getClass().equals(pageClassRef.get()))
{
requestParameters.setInterfaceName(IRedirectListener.INTERFACE.getName());
RequestCycle.get().getRequest().setPage(page);
return new PageRequestTarget(page);
}
else
{
// we didn't find the page, act as bookmarkable page request -
// create new instance, but only if there is no callback to a non-existing page