private String _getRenderFlashMapTokenFromPreviousRequest ( FacesContext facesContext ) { ExternalContext externalContext = facesContext . getExternalContext ( ) ; String tokenValue = null ; ClientWindow clientWindow = externalContext . getClientWindow ( ) ; if ( clientWindow != null ) { if ( facesContext . getApplication ( ) . getStateManager ( ) . isSavingStateInClient ( facesContext ) ) { Map < String , Object > sessionMap = externalContext . getSessionMap ( ) ; tokenValue = ( String ) sessionMap . get ( FLASH_RENDER_MAP_TOKEN + SEPARATOR_CHAR + clientWindow . getId ( ) ) ; } else { FlashClientWindowTokenCollection lruMap = getFlashClientWindowTokenCollection ( externalContext , false ) ; if ( lruMap != null ) { tokenValue = ( String ) lruMap . get ( clientWindow . getId ( ) ) ; } } } else { HttpServletResponse httpResponse = ExternalContextUtils . getHttpServletResponse ( externalContext ) ; if ( httpResponse != null ) { //Use a cookie Cookie cookie = ( Cookie ) externalContext . getRequestCookieMap ( ) . get ( FLASH_RENDER_MAP_TOKEN ) ; if ( cookie != null ) { tokenValue = cookie . getValue ( ) ; } } else { //Use HttpSession or PortletSession object Map < String , Object > sessionMap = externalContext . getSessionMap ( ) ; tokenValue = ( String ) sessionMap . get ( FLASH_RENDER_MAP_TOKEN ) ; } } return tokenValue ; }
Retrieve the map token of the render map from the previous request .