code: @SuppressWarnings("unchecked")
      private void _restoreMessages(FacesContext facesContext)
      {
          List<MessageEntry> messageList = (List<MessageEntry>) 
                  _getExecuteFlashMap(facesContext).get(FLASH_KEEP_MESSAGES_LIST);
  
          if (messageList != null)
          {
              Iterator<MessageEntry> iterMessages = messageList.iterator();
  
              while (iterMessages.hasNext())
              {
                  MessageEntry entry = iterMessages.next();
                  facesContext.addMessage(entry.clientId, entry.message);
              }
  
              // we can now remove the messagesList from the flashMap
              _getExecuteFlashMap(facesContext).remove(FLASH_KEEP_MESSAGES_LIST);
          }
      }
docs: Restore any saved FacesMessages from the previous request.
  Note that we don't need to save the keepMessages value for this request,
  because we just have to check if the value for FLASH_KEEP_MESSAGES_LIST exists.
  @param facesContext