if (originalPage != currentPage)
{
// Let developers know we're about to switch the view. Prep for it if necessary. If you want us
// to stop, throw a PreventHistoryChangeEvent and we'll set the boolean to stop it from going.
Session.getInstance().getEventBus()
.notifyObservers(new PreSwitchedHistoryViewEvent(currentPage, currentViews));
// We're all clear. Go ahead. These are the events you're looking for.
if (!interruptHistoryChange)
{
// Put the original events back into the event bus, wiping out all the events specific to the prior