code: public static CmsXmlContainerPage saveDetailOnlyPage(
          CmsObject cms,
          CmsResource content,
          String locale,
          CmsContainerPageBean page)
  
      throws CmsException {
  
          String detailOnlyPath = getDetailOnlyPageNameWithoutLocaleCheck(content.getRootPath(), locale);
          CmsResource resource = readOrCreateDetailOnlyPage(cms, content.getStructureId(), detailOnlyPath);
          CmsXmlContainerPage xmlCntPage = CmsXmlContainerPageFactory.unmarshal(cms, cms.readFile(resource));
          xmlCntPage.save(cms, page);
          return xmlCntPage;
      }
docs: Saves a detail-only page for a content.<p>
  
  If the detail-only page already exists, it is overwritten.
  
  @param cms the current CMS context
  @param content the content for which to save the detail-only page
  @param locale the locale
  @param page the container page data to save in the detail-only page
  
  @throws CmsException if something goes wrong
  @return the container page that was saved