code: protected void initModule() {
  
          Object o;
          CmsModule module;
  
          // first get the correct module
          if (CmsStringUtil.isNotEmpty(m_paramModule)) {
              module = (CmsModule)OpenCms.getModuleManager().getModule(m_paramModule).clone();
          } else {
              // create a new module
              module = new CmsModule();
          }
  
          // now try to get the dependency
          if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
              o = null;
          } else {
              // this is not the initial call, get module dependency from session
              o = getDialogObject();
          }
  
          if (!(o instanceof CmsModuleDependency)) {
              if (m_paramDependency == null) {
                  // there was no parameter given, so create a new, empty dependency
                  m_dependency = new CmsModuleDependency();
              } else {
                  // create a new module dependency by reading it from the module
                  List dependencies = module.getDependencies();
                  m_dependency = new CmsModuleDependency();
                  if ((dependencies != null) && (dependencies.size() > 0)) {
                      Iterator i = dependencies.iterator();
                      while (i.hasNext()) {
                          CmsModuleDependency dependency = (CmsModuleDependency)i.next();
                          if (dependency.getName().equals(m_paramDependency)) {
                              m_dependency = dependency;
                          }
                      }
                  }
              }
  
          } else {
              // reuse module dependency stored in session
              m_dependency = (CmsModuleDependency)o;
          }
  
      }
docs: Initializes the module  to work with depending on the dialog state and request parameters.<p>