code: private void initSite() {
  
          Object o = null;
          if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
              // this is the initial dialog call
              if (CmsStringUtil.isNotEmpty(m_paramSites)) {
                  // edit an existing site, get it from manager
                  o = OpenCms.getSiteManager().getSiteForSiteRoot(m_paramSites);
              }
          } else {
              // this is not the initial call, get site from session
              o = getDialogObject();
          }
          if (o instanceof CmsSite) {
              // reuse site stored in session
              m_site = new CmsSiteBean((CmsSite)o);
          } else if (o instanceof CmsSiteBean) {
              // create a new site
              m_site = (CmsSiteBean)o;
          } else if (DIALOG_NEW.equals(getParamEditaction())) {
              m_site = new CmsSiteBean();
          } else {
              try {
                  getToolManager().jspForwardTool(this, "/sites", new HashMap<String, String[]>());
              } catch (Exception e) {
                  // noop
              }
          }
  
          if (!m_site.hasSecureServer()) {
              m_site.setSecureUrl("");
          }
          try {
              CmsObject clone = OpenCms.initCmsObject(getCms());
              clone.getRequestContext().setSiteRoot("");
              String iconPath = m_site.getSiteRoot() + "/" + CmsSiteFaviconDialog.ICON_NAME;
              if (clone.existsResource(iconPath)) {
                  m_site.setFavicon(iconPath);
              }
          } catch (Throwable t) {
              // noop
          }
  
          if (m_site.getSiteRoot() != null) {
              setSitename(CmsResource.getName(m_site.getSiteRoot()));
          }
  
          CmsModule module = OpenCms.getModuleManager().getModule(MODULE_NAME);
          m_createou = Boolean.valueOf(module.getParameter(PARAM_CREATE_OU, Boolean.FALSE.toString())).booleanValue();
          m_ouDescription = module.getParameter(PARAM_OU_DESCRIPTION, "OU for: %(site)");
          setDialogObject(m_site);
      }
docs: Initializes the dialog site object.<p>