/** * Return a flag indicating if the resources associated with this <code>FacesContext</code> * instance have been released. * * @return <code>true</code> if the resources have been released. * @since 2.1 */ public boolean isReleased() { if (defaultFacesContext != null) { return defaultFacesContext.isReleased(); } throw new UnsupportedOperationException(); }
/** * While setting up PartialViewContextImpl the RI's FacesContextImpl is passed in, but while * processing phases also FacesContextWrapper must be supported. Therefore ctx is updated until * processing phases has started. Released FacesContext is updated too. */ private void updateFacesContext() { if (!processingPhases || ctx.isReleased()) { ctx = FacesContext.getCurrentInstance(); processingPhases = ctx.getCurrentPhaseId() != null; } }