+ context + "', fromAction='"
+ fromAction + "', outcome='"
+ outcome + "')");
}
DialogContext dcontext = (DialogContext)
context.getExternalContext().getRequestMap().get(Constants.CONTEXT_BEAN);
String prefix = prefix(context);
if (dcontext == null) {
if ((outcome != null) && outcome.startsWith(prefix)) {
// Create and start a new DialogContext instance
DialogContextManager manager = (DialogContextManager)
context.getApplication().getVariableResolver().
resolveVariable(context, Constants.MANAGER_BEAN);
dcontext =
manager.create(context, outcome.substring(prefix.length()));
dcontext.start(context);
if (log.isDebugEnabled()) {
log.debug("Starting dialog '"
+ outcome.substring(prefix.length())
+ "' for FacesContext instance '"
+ context + "' with navigation to viewId '"
+ context.getViewRoot().getViewId() + "'");
}
return;
} else {
// No active dialog, so delegate to the original handler
original.handleNavigation(context, fromAction, outcome);
return;
}
} else {
// Advance the currently active DialogContext instance
dcontext.advance(context, outcome);
if (log.isDebugEnabled()) {
log.debug("Advancing dialog '"
+ dcontext.getName() + "' for FacesContext '"
+ context + "' with navigation to viewId '"
+ context.getViewRoot().getViewId() + "'");
}
}