code: public void decode(FacesContext facesContext)
      {
          if (facesContext.isPostback())
          {
              // In postback, we can safely ignore the query param, because it is not useful
              if (getId() == null)
              {
                   setId(calculateWindowIdFromPost(facesContext));
              }
          }
  
          if (!isClientSideWindowHandlerRequest(facesContext))
          {
              return;
          }
          
          ExternalContext externalContext = facesContext.getExternalContext();
  
          if (isNoscriptRequest(externalContext))
          {
              // the client has JavaScript disabled
              clientConfig.setJavaScriptEnabled(false);
              return;
          }
  
          String windowId = getWindowIdFromCookie(externalContext);
          if (windowId == null)
          {
              // GET request without windowId - send windowhandlerfilter.html to get the windowId
              sendWindowHandlerHtml(facesContext, null);
              facesContext.responseComplete();
          }
          else
          {
              if (AUTOMATED_ENTRY_POINT_PARAMETER_KEY.equals(windowId) ||
                  (!windowContextConfig.isUnknownWindowIdsAllowed() /*&&
                   !ConversationUtils.isWindowActive(this.windowContextManager, windowId)*/))
              {
                  // no or invalid windowId --> create new one
                  // don't use createWindowId() the following call will ensure the max. window context count,...
                  //windowId = this.windowContextManager.getCurrentWindowContext().getId();
                  windowId = createWindowId(facesContext);
  
                  // GET request with NEW windowId - send windowhandlerfilter.html to set and re-get the windowId
                  sendWindowHandlerHtml(facesContext, windowId);
                  facesContext.responseComplete();
              }
              else
              {
                  // we have a valid windowId - set it and continue with the request
                  // TODO only set internally and provide via restoreWindowId()? 
                  //externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY, windowId);
                  setId(windowId);
              }
          }
      }
docs: public void beforeLifecycleExecute(FacesContext facesContext)