code: protected void initModule() {
  
          Object o;
          CmsModule module;
  
          if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
              // this is the initial dialog call
              if (CmsStringUtil.isNotEmpty(m_paramModule)) {
                  // edit an existing module, get it from manager
                  o = OpenCms.getModuleManager().getModule(m_paramModule);
              } else {
                  // create a new module
                  o = null;
              }
          } else {
              // this is not the initial call, get module from session
              o = getDialogObject();
          }
  
          if (!(o instanceof CmsModule)) {
              // create a new module
              module = new CmsModule();
  
          } else {
              // reuse module stored in session
              module = (CmsModule)((CmsModule)o).clone();
          }
  
          List exportpoints = module.getExportPoints();
          m_exportpoint = new CmsExportPoint();
          if ((exportpoints != null) && (exportpoints.size() > 0)) {
              Iterator i = exportpoints.iterator();
              while (i.hasNext()) {
                  CmsExportPoint exportpoint = (CmsExportPoint)i.next();
                  if (exportpoint.getUri().equals(m_paramExportpoint)) {
                      m_exportpoint = exportpoint;
                  }
              }
          }
  
      }
docs: Initializes the module  to work with depending on the dialog state and request parameters.<p>