private Map<MVSKey, Object> getMVSStore(boolean create) {
            FacesContext fc = getFacesContext();
            Map<String, Object> sessionMap = fc.getExternalContext().getSessionMap();

            PrimeApplicationContext primeApplicationContext = PrimeApplicationContext.getCurrentInstance(fc);
            String clientWindowId = "session";
            if ("client-window".equals(primeApplicationContext.getConfig().getMultiViewStateStore())) {
                ExternalContext externalContext = fc.getExternalContext();
                ClientWindow clientWindow = externalContext.getClientWindow();
                if (clientWindow != null && LangUtils.isNotBlank(clientWindow.getId())) {
                    clientWindowId = clientWindow.getId();
                }
            }

            Map<String, Map<MVSKey, Object>> clientWindowMap = (Map) sessionMap.computeIfAbsent(Constants.MULTI_VIEW_STATES, k -> new ConcurrentHashMap<>());
            Map<MVSKey, Object> mvsMap = clientWindowMap.get(clientWindowId);

            if (mvsMap == null) {
                if (create) {
                    mvsMap = new ConcurrentHashMap<>();
                    clientWindowMap.put(clientWindowId, mvsMap);
                }
                else {
                    mvsMap = Collections.emptyMap();
                }
            }

            return mvsMap;
        }
Gets multiview state attached to a component in a specific view.

@param viewId viewId of a page
@param clientId clientId of a component
@param <T> bean state generic

@return multiview state bean attached to a component or null
primefaces/src/main/java/org/primefaces/PrimeFaces.java