PrettyContext prettyContext = PrettyContext.getCurrentInstance(facesContext);
if (prettyContext.shouldProcessDynaview())
{
// We are only using this lifecycle to access the EL-Context.
// End the faces lifecycle and finish processing after the Phase
UIViewRoot viewRoot = facesContext.getViewRoot();
if (viewRoot == null)
{
viewRoot = new UIViewRoot();
viewRoot.setViewId("/com.ocpsoft.Dynaview.xhtml");
facesContext.setViewRoot(viewRoot);
}
facesContext.responseComplete();
}
}