docs: public void tagJSAction(CmsObject cms, HttpServletRequest req) throws CmsException, IOException {
  
          CmsJspStandardContextBean standardContext = getStandardContext(cms, req);
          CmsContainerPageBean containerPage = standardContext.getPage();
          String includeType = TYPE_JAVASCRIPT;
          Set<String> jsIncludes = new LinkedHashSet<String>();
          Map<String, String> inlineJS = new LinkedHashMap<String, String>();
          // add defaults
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_defaults)) {
              String[] defaults = m_defaults.split("\\|");
              for (int i = 0; i < defaults.length; i++) {
                  jsIncludes.add(defaults[i].trim());
              }
          }
          collectHeadIncludesForContainerElement(
              cms,
              req,
              standardContext,
              containerPage,
              includeType,
              jsIncludes,
              inlineJS);
          if (standardContext.getDetailContentId() != null) {
              try {
                  CmsResource detailContent = cms.readResource(
                      standardContext.getDetailContentId(),
                      CmsResourceFilter.ignoreExpirationOffline(cms));
                  CmsFormatterConfiguration config = OpenCms.getADEManager().lookupConfiguration(
                      cms,
                      cms.getRequestContext().getRootUri()).getFormatters(cms, detailContent);
                  boolean requiresAllIncludes = true;
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getDetailtype())
                      && CmsStringUtil.isNotEmptyOrWhitespaceOnly(getDetailwidth())) {
                      try {
                          int width = Integer.parseInt(getDetailwidth());
                          I_CmsFormatterBean formatter = config.getDetailFormatter(getDetailtype(), width);
                          jsIncludes.addAll(formatter.getJavascriptHeadIncludes());
                          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(formatter.getInlineJavascript())) {
                              inlineJS.put(formatter.getId(), formatter.getInlineJavascript());
                          }
                          requiresAllIncludes = false;
                      } catch (NumberFormatException ne) {
                          // nothing to do, we will include JavaScript for all detail containers
                      }
                  }
                  if (requiresAllIncludes) {
                      for (I_CmsFormatterBean formatter : config.getDetailFormatters()) {
                          jsIncludes.addAll(getHeadIncludes(formatter, includeType));
                          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(formatter.getInlineJavascript())) {
                              inlineJS.put(formatter.getId(), formatter.getInlineJavascript());
                          }
                      }
                  }
              } catch (CmsException e) {
                  LOG.error(
                      Messages.get().getBundle().key(
                          Messages.ERR_READING_REQUIRED_RESOURCE_1,
                          standardContext.getDetailContentId()),
                      e);
              }
          }
          for (String jsUri : jsIncludes) {
              pageContext.getOut().print(
                  "\n<script type=\"text/javascript\" src=\""
                      + CmsJspTagLink.linkTagAction(jsUri.trim(), req)
                      + generateReqParams()
                      + "\"></script>");
          }
          if (!inlineJS.isEmpty()) {
              StringBuffer inline = new StringBuffer();
              for (Entry<String, String> jsEntry : inlineJS.entrySet()) {
                  inline.append("\n<script type=\"text/javascript\">\n");
                  inline.append(jsEntry.getValue()).append("\n\n");
                  inline.append("\n</script>\n");
              }
              pageContext.getOut().print(inline.toString());
          }
      }