facesContext.setViewRoot(viewRoot);
JsfUtils.notifyAfterListeners(PhaseId.RESTORE_VIEW, facesLifecycle, facesContext);
facesContext.setViewRoot(viewRoot);
facesContext.renderResponse();
try {
JsfUtils.notifyBeforeListeners(PhaseId.RENDER_RESPONSE, facesLifecycle, facesContext);
logger.debug("Asking view handler to render view");
facesContext.getApplication().getViewHandler().renderView(facesContext, viewRoot);
JsfUtils.notifyAfterListeners(PhaseId.RENDER_RESPONSE, facesLifecycle, facesContext);