BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
EditableWindowContextManager windowContextManager =
CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);
WindowContextConfig windowContextConfig =
CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);
ViewAccessConversationExpirationEvaluatorRegistry registry =
CodiUtils.getContextualReferenceByClass(
beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);
UIViewRoot uiViewRoot = facesContext.getViewRoot();
//e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
if(uiViewRoot == null)
{
return;
}
registry.broadcastRenderedViewId(uiViewRoot.getViewId());
storeCurrentViewIdAsOldViewId(facesContext);
if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
{
cleanupInactiveWindowContexts(windowContextManager);
}
//if the cache would get resetted by an observer or a phase-listener