code: protected void onSiteChange(String site) {
  
          try {
              m_treeData.removeAllItems();
              CmsObject rootCms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
              rootCms.getRequestContext().setSiteRoot("");
              CmsResource siteRootResource = rootCms.readResource(site);
  
              m_treeData.initRoot(rootCms, siteRootResource);
              m_fileTree.expandItem(siteRootResource.getStructureId());
              m_siteRoot = site;
              updateRoot(rootCms, siteRootResource);
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
      }
docs: Called when the user changes the site.<p>
  
  @param site the new site root