code: private static Map<String, Object> findScopedMap(final FacesContext facesContext, final Object property)
      {
          if (facesContext == null)
          {
              return null;
          }
          
          final ExternalContext extContext = facesContext.getExternalContext();
          if (extContext == null)
          {
              return null;
          }
  
          final boolean startup = (extContext instanceof StartupServletExternalContextImpl);
          Map<String, Object> scopedMap;
  
          // request scope (not available at startup)
          if (!startup)
          {
              scopedMap = extContext.getRequestMap();
              if (scopedMap.containsKey(property))
              {
                  return scopedMap;
              }
          }
  
          // jsf 2.0 view scope
          UIViewRoot root = facesContext.getViewRoot();
          if (root != null)
          {
              scopedMap = root.getViewMap(false);
              if (scopedMap != null && scopedMap.containsKey(property))
              {
                  return scopedMap;
              }
          }
  
          // session scope (not available at startup)
          if (!startup)
          {
              scopedMap = extContext.getSessionMap();
              if (scopedMap.containsKey(property))
              {
                  return scopedMap;
              }
          }
  
          // application scope
          scopedMap = extContext.getApplicationMap();
          if (scopedMap.containsKey(property))
          {
              return scopedMap;
          }
  
          // not found
          return null;
      }
docs: returns null if not found