private void processPreDestroyViewMap(SystemEvent se){
  if (LOGGER.isLoggable(Level.FINEST)) {
    LOGGER.log(Level.FINEST,"Handling PreDestroyViewMapEvent");
  }
  UIViewRoot viewRoot=(UIViewRoot)se.getSource();
  Map<String,Object> viewMap=viewRoot.getViewMap(false);
  if (viewMap != null && !viewMap.isEmpty()) {
    FacesContext facesContext=FacesContext.getCurrentInstance();
    if (contextManager != null) {
      contextManager.clear(facesContext,viewMap);
      contextManager.fireDestroyedEvent(facesContext,viewRoot);
    }
    destroyBeans(facesContext,viewMap);
  }
}

private void processPreDestroyViewMap ( SystemEvent se ) { if ( LOGGER . isLoggable ( Level . FINEST ) ) { LOGGER . log ( Level . FINEST , "Handling PreDestroyViewMapEvent" ) ; } UIViewRoot viewRoot = ( UIViewRoot ) se . getSource ( ) ; Map < String , Object > viewMap = viewRoot . getViewMap ( false ) ; if ( viewMap != null && ! viewMap . isEmpty ( ) ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; if ( contextManager != null ) { contextManager . clear ( facesContext , viewMap ) ; contextManager . fireDestroyedEvent ( facesContext , viewRoot ) ; } destroyBeans ( facesContext , viewMap ) ; } }
process the predestroyviewmap system event .
