code: protected void submit(Window window, CmsResourceTypeApp app) {
  
          if (isValid()) {
              CmsModule module = OpenCms.getModuleManager().getModule(m_type.getModuleName()).clone();
              if (isKeepTypeCase()) {
                  saveResourceType(module);
              } else {
                  try {
                      changeIdNameOrSchema(module);
                  } catch (CmsConfigurationException e) {
                      LOG.error("Unable to change resource type.", e);
                  }
              }
  
              try {
                  OpenCms.getModuleManager().updateModule(m_cms, module);
                  OpenCms.getResourceManager().initialize(m_cms);
                  OpenCms.getWorkplaceManager().addExplorerTypeSettings(module);
                  // re-initialize the workplace
                  OpenCms.getWorkplaceManager().initialize(m_cms);
              } catch (CmsException e) {
                  LOG.error("Unable to save resource type", e);
              }
  
              window.close();
              app.reload();
          }
  
      }
docs: Submit changes.<p>
  
  @param window Window
  @param app app