{
log.debug("Navigation requested: fromAction [" + fromAction + "], outcome [" + outcome + "]");
if (!pr.redirect(context, outcome))
{
log.debug("Not a PrettyFaces navigation string - passing control to default nav-handler");
PrettyContext prettyContext = PrettyContext.getCurrentInstance(context);
prettyContext.setInNavigation(true);
String originalViewId = context.getViewRoot().getViewId();
parent.handleNavigation(context, fromAction, outcome);
String newViewId = context.getViewRoot().getViewId();
/*
* Navigation is complete if the viewId has not changed or the response is complete
*/
if ((true == context.getResponseComplete()) || originalViewId.equals(newViewId))
{
prettyContext.setInNavigation(false);
}
}
}