{
log.finest("entering " + executor.getPhase() + " in " + LifecycleImpl.class.getName());
}
PhaseId currentPhaseId = executor.getPhase();
Flash flash = context.getExternalContext().getFlash();
try
{
/*
* Specification, section 2.2
* The default request lifecycle processing implementation must ensure that the currentPhaseId property
* of the FacesContext instance for this request is set with the proper PhaseId constant for the current
* phase as the first instruction at the beginning of each phase
*/
context.setCurrentPhaseId(currentPhaseId);
flash.doPrePhaseActions(context);
// let the PhaseExecutor do some pre-phase actions
executor.doPrePhaseActions(context);
phaseListenerMgr.informPhaseListenersBefore(currentPhaseId);
if (isResponseComplete(context, currentPhaseId, true))
{
// have to return right away
return true;
}
if (shouldRenderResponse(context, currentPhaseId, true))
{
skipFurtherProcessing = true;
}
if (executor.execute(context))
{
return true;
}
}
catch (Throwable e)
{
// JSF 2.0: publish the executor's exception (if any).
publishException (e, currentPhaseId, context);
}
finally
{
phaseListenerMgr.informPhaseListenersAfter(currentPhaseId);
flash.doPostPhaseActions(context);
}
context.getExceptionHandler().handle();